Last modified: 2010-05-15 15:59:41 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 T14418, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 12418 - Database error when trying to view a Special: page without read permission
Database error when trying to view a Special: page without read permission
Status: RESOLVED DUPLICATE of bug 11668
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
1.11.x
All All
: Lowest trivial (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-12-26 02:34 UTC by Dan Jacobson
Modified: 2010-05-15 15:59 UTC (History)
2 users (show)

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


Attachments

Description Dan Jacobson 2007-12-26 02:34:08 UTC
In case one is looking for ways to generate PHP error messages, in
LocalSettings.php set $wgGroupPermissions['*']['read']=false; and then
browse e.g., [[Special:zzzzzz]], [[Special:Specialpages]].
Comment 1 Victor Vasiliev 2007-12-26 07:47:45 UTC
I can't see any error messages. May you show which error messages are shown?
Comment 2 Roan Kattouw 2007-12-26 17:58:45 UTC
(In reply to comment #1)
> I can't see any error messages. May you show which error messages are shown?

A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was:

    SELECT * FROM `protected_titles` WHERE pt_namespace = '-1' AND pt_title = 'Specialpages' 

from within function "Database::select". MySQL returned error "1146: Table 'wiki.protected_titles' doesn't exist (localhost)".


Could that be the error message? In that case you have to run maintenance/update.php

I also don't get any errors, neither in 1.12svn nor in 1.11.0
Comment 3 Dan Jacobson 2007-12-28 00:06:16 UTC
OK, perhaps you can reproduce the following from my _offline_ _simulated_
Internet.

In LocalSettings.php use
$wgShowExceptionDetails = true;
$wgGroupPermissions['*']['read']=false;

Note the incorrect behavior with title=Special:Zzz,
and the correct behavior with title=Zzz, both of which do not exist.

  $ w3m -dump http://transgender-taiwan.org/index.php?title=Special:Zzz\&uselang=en
  [transgende]Internal error

  Invalid special page name ""

  Backtrace:

  #0 /var/lib/mediawiki-1.11.0/includes/Title.php(1305): SpecialPage::getTitleFor
  (false)
  #1 /var/lib/mediawiki-1.11.0/includes/Wiki.php(133): Title->userCanRead()
  #2 /var/lib/mediawiki-1.11.0/includes/Wiki.php(43): MediaWiki->
  preliminaryChecks(Object(Title), Object(StubObject), Object(WebRequest))
  #3 /var/lib/mediawiki-1.11.0/index.php(89): MediaWiki->initialize(Object
  (Title), Object(StubObject), Object(User), Object(WebRequest))
  #4 {main}

  $ w3m -dump http://transgender-taiwan.org/index.php?title=Zzz\&uselang=en
  Login Required ... You must log in to view other pages...

So we see requests for special pages that don't exist bypass some
checks, getting themselves into trouble.

What is worst is requests for special pages that _do_ exist.

  $ w3m -dump http://transgender-taiwan.org/index.php?title=Special:Specialpages\&uselang=en

  Warning: in_array() [function.in-array]: Wrong datatype for second argument in
  /var/lib/mediawiki-1.11.0/includes/Title.php on line 1306

  Login Required... You must log in to view other pages.

The error message jabs itself into the HTML...

Same error e.g., for Special:Listusers.

(Browser above doesn't send any cookies, but that doesn't matter.)
(The above is from a vanilla fresh install of 1.11. No need to run update.php.)
Comment 4 Brion Vibber 2007-12-28 01:12:51 UTC

*** This bug has been marked as a duplicate of bug 11668 ***

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


Navigation
Links