Commit 63864050 by Scott

Prevent invisible characters in usernames

Fixes #812
parent 6e93251a
...@@ -51,8 +51,9 @@ function qa_handle_email_filter(&$handle, &$email, $olduser = null) ...@@ -51,8 +51,9 @@ function qa_handle_email_filter(&$handle, &$email, $olduser = null)
$errors = array(); $errors = array();
// sanitise 4-byte Unicode // sanitize 4-byte Unicode and invisible characters
$handle = qa_remove_utf8mb4($handle); $handle = qa_remove_utf8mb4($handle);
$handle = preg_replace('/\p{C}+/u', '', $handle);
$filtermodules = qa_load_modules_with('filter', 'filter_handle'); $filtermodules = qa_load_modules_with('filter', 'filter_handle');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment