Page MenuHomePhabricator

user_patch.patch

Authored By
bzimport
Nov 21 2014, 10:04 PM
Size
936 B
Referenced Files
None
Subscribers
None

user_patch.patch

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

Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4261
Default Alt Text
user_patch.patch (936 B)

Event Timeline