Last modified: 2007-06-26 07:23:40 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 T12160, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 10160 - SpecialAllpages.php returns results for unknown namespaces
SpecialAllpages.php returns results for unknown namespaces
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Special pages (Other open bugs)
1.11.x
All All
: Lowest trivial with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
: easy
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-06-06 02:21 UTC by Dan Jacobson
Modified: 2007-06-26 07:23 UTC (History)
3 users (show)

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


Attachments
Proposed patch (1.30 KB, patch)
2007-06-22 11:25 UTC, Max Semenik
Details
New patch (1.46 KB, patch)
2007-06-22 14:17 UTC, Max Semenik
Details

Description Dan Jacobson 2007-06-06 02:21:40 UTC
I have discovered SpecialAllpages.php goes ahead and returns results
for unknown namespaces:

$ for NS in `seq -8 1 8`; do printf %2i: $NS;
  wget -O - http://some_wiki/index.php?title=Special%3AAllpages\&namespace=$NS -q|
  wc -wc; done
-8:    995   35434
-7:    995   35434
-6:    995   35434
-5:    995   35434
-4:    995   35434
-3:    995   35434
-2:    528    8515
-1:    528    8515
 0:    995   35433
 1:    553    9659
 2:    535    8816
 3:    534    8680
 4:    551    9795
 5:    548    9392
 6:    529    8584
 7:    531    8594
 8:    533    8771

It should say "Unknown namespace" instead of interpreting an empty
match as NULL==0 or whatever.
Comment 1 Rob Church 2007-06-06 02:52:06 UTC
This is what we call graceful failure.
Comment 2 Antoine "hashar" Musso (WMF) 2007-06-10 16:19:22 UTC
Marking it as INVALID, we fallback to NS_MAIN (0) and the list box display
correctly. Showing an error message seems unhelpful.
Comment 3 Brion Vibber 2007-06-12 20:05:01 UTC
Showing an error message sounds entirely helpful -- then you know what's wrong instead of sitting there going "what the heck".
Comment 4 Max Semenik 2007-06-22 11:25:34 UTC
Created attachment 3809 [details]
Proposed patch
Comment 5 Rob Church 2007-06-22 13:43:50 UTC
I would suggest not aborting outright, but showing the error message, e.g. "Invalid namespace selected." and then proceeding to show the form, perhaps defaulting to the main namespace as usual, so the user can correct the selection without hitting the back button or correcting the URL.
Comment 6 Max Semenik 2007-06-22 14:17:34 UTC
Created attachment 3813 [details]
New patch

(In reply to comment #5)
> I would suggest not aborting outright, but showing the error message, e.g.
> "Invalid namespace selected." and then proceeding to show the form, perhaps
> defaulting to the main namespace as usual, so the user can correct the
> selection without hitting the back button or correcting the URL.
> 

Fixed this in new patch.
Comment 7 Rob Church 2007-06-22 14:20:26 UTC
Error message text needs to be changed, message is handled as HTML; either have it parsed, or make sure it's escaped.
Comment 8 Raimond Spekking 2007-06-26 07:23:40 UTC
Fixed in r23413 with some other tweakings (use of XML functions, RTL wikis)

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


Navigation
Links