Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F4696
user_patch.patch
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
•
bzimport
Nov 21 2014, 10:04 PM
2014-11-21 22:04:40 (UTC+0)
Size
936 B
Referenced Files
None
Subscribers
None
user_patch.patch
View Options
Index: User.php
===================================================================
--- User.php (revision 57369)
+++ User.php (working copy)
@@ -574,7 +574,12 @@
if ( !self::isValidUserName( $name ) ) {
return false;
}
-
+ //Ensure that the username does not contain @ symbol
+ else if ( preg.match( '@', $name ) {
+ return false;
+ }
+
+
static $reservedUsernames = false;
if ( !$reservedUsernames ) {
$reservedUsernames = $wgReservedUsernames;
@@ -607,12 +612,13 @@
* @return \bool True or false
*/
static function isCreatableName( $name ) {
- global $wgInvalidUsernameCharacters;
+ global $wgInvalidUsernameCharacters, $wgInvalidUsernameCharacters;
return
self::isUsableName( $name ) &&
-
+
// Registration-time character blacklisting...
!preg_match( '/[' . preg_quote( $wgInvalidUsernameCharacters, '/' ) . ']/', $name );
+
}
/**
File Metadata
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4261
Default Alt Text
user_patch.patch (936 B)
Attached To
Mode
T14581: @ (at-sign) needs to be totally invalid for usernames
Attached
Detach File
Event Timeline
Log In to Comment