Last modified: 2014-09-23 23:09:38 UTC
$wgSpamRegex should be checked against the user name and e-mail address on accoutn registration.
inside function addNewAccountInternal(): # spam check global $wgSpamRegex; if ($wgSpamRegex) { if ( preg_match( $wgSpamRegex, $this->mEmail ) ) { $this->mainLoginForm( wfMsg( 'detectedSpam' ) ); return false; } }
^^ This only checks the email address tho
Created attachment 8072 [details] Spam check in user name and email validity checks Wouldn't it be better to check for spam right in User's checks validity of username and email?
you're right. moved it to the top of addNewAccount()
wait. I only wanted to block new spam bits with certain e-mail adresses like da.vid.smi.th.999@gmail.com if you think that's better ok, no idea.
*Bulk BZ Change: +Patch to open bugs with patches attached that are missing the keyword*
Matěj Grabovský, thank you for the patch, and sorry for the wait. I'm adding the "need-review" keyword so that developers know to review your patch. Thanks again.
First part of the patch is fine and applyable (looks fine). As for the 2nd part, that's moved to the Sanitizer As it's a function called "validateEmail", I'm dubious about adding random MW specific blocking code in there