Page MenuHomePhabricator

Run $wgSpamRegex on Account registration
Open, MediumPublicFeature

Description

$wgSpamRegex should be checked against the user name and e-mail address on accoutn registration.


Version: unspecified
Severity: enhancement

Details

Reference
bz26808

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:15 PM
bzimport set Reference to bz26808.
bzimport added a subscriber: Unknown Object (MLST).

inside function addNewAccountInternal():

  1. 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
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?

Attached:

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*

sumanah wrote:

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

Aklapper changed the subtype of this task from "Task" to "Feature Request".Feb 4 2022, 12:24 PM