Last modified: 2011-01-27 20:54:16 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T28948, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 26948 - Problems with e-mail validation script
Problems with e-mail validation script
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Email (Other open bugs)
1.17.x
All All
: Normal minor (vote)
: ---
Assigned To: Antoine "hashar" Musso (WMF)
:
Depends on:
Blocks: 26611 26676
  Show dependency treegraph
 
Reported: 2011-01-26 00:55 UTC by Nux
Modified: 2011-01-27 20:54 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Nux 2011-01-26 00:55:21 UTC
As said in Bug 26910:

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.
Comment 1 Antoine "hashar" Musso (WMF) 2011-01-26 07:27:17 UTC
Self notes:

Since rfc5322_atext is used inside brackets, the hyphen - is interpreted as a range operator (need to be checked in both JS and PHP version + tests).

I already removed the incorrect character in r79952.
Comment 2 Antoine "hashar" Musso (WMF) 2011-01-26 07:44:02 UTC
blocks 1.17
Comment 3 Mark A. Hershberger 2011-01-27 04:02:35 UTC
Ashar, is this fixed in r79952?
Comment 4 Antoine "hashar" Musso (WMF) 2011-01-27 10:28:23 UTC
Nux detected three issues:

1) backslash the dash "-" in rfc5322_atext (check both JS & PHP versions)
2) code cleanup in JS version
3) invalid utf8 character

I plan to fix and update tests for 1 & 2 next week. 3 is the only one fixed by r79952. I would then make sure they get reviewed by poking someone on IRC and tag them for 1.17 merge.

Being minor changes, they can be handled by someone else if there is any emergency.

Lowering severity to "minor".
Comment 5 Antoine "hashar" Musso (WMF) 2011-01-27 20:54:16 UTC
Fixed in r81101
Marked revision for inclusion in 1.17

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links