Page MenuHomePhabricator

PHP/JS email validation unstable in 1.17 branch
Closed, ResolvedPublic

Description

This is merely a reminder for Roan.

The feature supporting email validation (PHP + JS in User:Preferences) is currently unstable in branch 1.17. It need some follow up revisions:

r79924 js (Krinkle fix) OK - tagged 1.17

r79926 js/PHP OK -- tagged 1.17
r79952 js (indentation) OK - tagged 1.17

r80694 PHP (fix localhost) -- merged by r80722
r80913 PHP (comment) - tagged 1.17
r80918 JS (fix localhost) - tagged 1.17

Easy copy paste: 79924 79926 79952 80913 80918

I have tagged them 1.17.


Version: 1.17.x
Severity: normal

Details

Reference
bz26910

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:22 PM
bzimport added a project: MediaWiki-Email.
bzimport set Reference to bz26910.

The variable rfc5322_atext contains "...+-/...". This doesn't seem right (RegExp would also catch ",") and so "-" should be backslashed (double backslashed).

Also I think that var keyword should be placed before rfc1034_ldh_str as the comment above it makes the code less clear.

And a minor code cleanup - change this:
'[' + rfc5322_atext + '\\.' + ']' + '+'
to this (shorter and clearer):
'[' + rfc5322_atext + '\\.]+'

BTW there is an error message here:
http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/resources/mediawiki.util/mediawiki.util.js?view=markup&pathrev=79924

Maybe this is because of the the character next to "}" in rfc5322_atext which I see as a highlight question mark or as "Ń" (depending on codepage). Not sure what it is. Probably should be encoded in some other way.

(In reply to comment #0)

Easy copy paste: 79924 79926 79952 80913 80918

I have tagged them 1.17.

All merged now.

Hm... I thought this was to be reviewed. Nevermind. Just in case you would be interested I moved my comments here: Bug 26948.

Thanks Roan. I am closing this merge request and subscribing to Nux's bug