Skip to content

Commit 6386405

Browse files
committed
Prevent invisible characters in usernames
Fixes #812
1 parent 6e93251 commit 6386405

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

qa-include/app/users-edit.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,9 @@ function qa_handle_email_filter(&$handle, &$email, $olduser = null)
5151

5252
$errors = array();
5353

54-
// sanitise 4-byte Unicode
54+
// sanitize 4-byte Unicode and invisible characters
5555
$handle = qa_remove_utf8mb4($handle);
56+
$handle = preg_replace('/\p{C}+/u', '', $handle);
5657

5758
$filtermodules = qa_load_modules_with('filter', 'filter_handle');
5859

0 commit comments

Comments
 (0)