Page MenuHomePhabricator
Authored By
bzimport
Nov 21 2014, 9:31 PM
Size
1 KB
Referenced Files
None
Subscribers
None

8273.txt

Index: includes/SpecialUserlogin.php
===================================================================
--- includes/SpecialUserlogin.php (revision 18352)
+++ includes/SpecialUserlogin.php (working copy)
@@ -250,7 +250,19 @@
$this->mainLoginForm( wfMsg( 'noname' ) );
return false;
}
+
+ $filter=wfMsg( 'account-filter' ); //load regexp filter database
+ $filter=explode( "\n", $filter ); //explode it on newlines
+ $black=false; //set block variable to false. we change it to true if name matches blacklist
+ for( $i=0; $i<sizeof( $filter ); $i++ ) {
+ if( preg_match( trim( $filter[$i]), $name ) ) { $black=true; } //if we have a regex match, block creation
+ }
+ if ( $black==true ) {
+ $this->mainLoginForm( wfMsg( 'noname' ) );
+ return false;
+ }
+
if ( 0 != $u->idForName() ) {
$this->mainLoginForm( wfMsg( 'userexists' ) );
return false;

File Metadata

Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3098
Default Alt Text
8273.txt (1 KB)

Event Timeline