Last modified: 2013-06-18 15:08:52 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 T27878, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 25878 - SpecialPage::exists should normalize input
SpecialPage::exists should normalize input
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Special pages (Other open bugs)
1.17.x
All All
: High enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch, patch-reviewed
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-11-10 20:26 UTC by Umherirrender
Modified: 2013-06-18 15:08 UTC (History)
3 users (show)

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


Attachments
Normalize input in exists (766 bytes, patch)
2010-11-10 20:26 UTC, Umherirrender
Details

Description Umherirrender 2010-11-10 20:26:52 UTC
Created attachment 7812 [details]
Normalize input in exists

The input of SpecialPage::exists is not normalized, so special pages with spaces are not marked as exists.

This affected (at least) the special page normalizing of the api (bug 24185)

Thanks.

See also bug 25713
Comment 1 Umherirrender 2010-11-10 20:42:49 UTC
Maybe resolveAliasWithSubpage is better as resolveAlias in this case ...
Comment 2 Derk-Jan Hartman 2010-11-10 20:43:46 UTC
The patch doesn't strip Special page name parameters, and resolveAlias only officially deals with aliases, it does not guarantee that the "plain" form is tested. I'll just add space normalization to exists instead.
Comment 3 Derk-Jan Hartman 2010-11-10 20:55:41 UTC
hmm, this problem is wider however. The name of Special pages is nowhere enforced to use the dbkey form. Perhaps we should fix uses of SpecialPage:exists instead ?
Comment 4 Brion Vibber 2011-01-24 04:51:11 UTC
(In reply to comment #2)
> The patch doesn't strip Special page name parameters, and resolveAlias only
> officially deals with aliases, it does not guarantee that the "plain" form is
> tested. I'll just add space normalization to exists instead.

Should work to run the string through self::resolveAliasWithSubpage(), then check the first element of the returned array.
Comment 5 Sumana Harihareswara 2011-11-10 06:22:15 UTC
Umherirrender, thanks for the patch.  You've received code review in the last few comments; are you interested in updating your patch to deal with those issues?  Thanks again.
Comment 6 Umherirrender 2011-11-12 21:00:11 UTC
Looks fixed after r86255, because that rev adds the call to resolveAlias. resolveAlias handles the space problem correct.

Marking as FIXED.

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


Navigation
Links