-
-
Notifications
You must be signed in to change notification settings - Fork 286
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MBS-13857: Block unicode Tags block in usernames
These can be used for flag emojis, which can have their place on entity names, annotations and the like. But they can (and have been) also be used as invisible characters to create seemingly-duplicate usernames, which is gaming the project. The downside seems higher than the dubious benefit of emoji flags in usernames, so this blocks their use there. In any case, it seems most emoji flags use regional indicator symbols instead.
- Loading branch information
1 parent
5a20802
commit 67e9b80
Showing
2 changed files
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -106,6 +106,15 @@ test 'Trying to register with an invalid name' => sub { | |
like($mech->uri, qr{/register}, 'stays on registration page'); | ||
$mech->content_contains('username contains invalid characters', 'form has error message for invisible characters in username'); | ||
|
||
$mech->submit_form( with_fields => { | ||
'register.username' => "test\N{TAG LATIN CAPITAL LETTER T}\N{TAG LATIN CAPITAL LETTER E}\N{TAG LATIN CAPITAL LETTER S}\N{TAG LATIN CAPITAL LETTER T}", | ||
'register.password' => 'foo', | ||
'register.confirm_password' => 'foo', | ||
'register.email' => '[email protected]', | ||
}); | ||
like($mech->uri, qr{/register}, 'stays on registration page'); | ||
$mech->content_contains('username contains invalid characters', 'form has error message for tag characters in username'); | ||
|
||
$mech->submit_form( with_fields => { | ||
'register.username' => 'looks://like_a_url_to_me', | ||
'register.password' => 'foo', | ||
|