Last modified: 2008-06-29 00:07:56 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 14678 - API ignores $wgShowSQLErrors
API ignores $wgShowSQLErrors
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
All All
: Normal major (vote)
: ---
Assigned To: Roan Kattouw
: patch
Depends on:
  Show dependency treegraph
Reported: 2008-06-28 19:59 UTC by Max Semenik
Modified: 2008-06-29 00:07 UTC (History)
2 users (show)

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

Proposed patch (970 bytes, patch)
2008-06-28 19:59 UTC, Max Semenik
$wgShowExceptionDetails too (1.12 KB, patch)
2008-06-28 20:37 UTC, Max Semenik

Description Max Semenik 2008-06-28 19:59:48 UTC
Created attachment 5033 [details]
Proposed patch

Revealing SQL query in cases of error poses security threat.
Comment 1 Brion Vibber 2008-06-28 20:18:56 UTC
Couple of quick comments:

First, the API code is also ignoring $wgShowExceptionDetails here (also set to false by default). The backtrace includes chunks of parameter strings and other info which can reveal part or all of the query, so I'd recommend making sure it checks both of these settings and follows them.

Second, a minor quibble -- is_a() is deprecated in PHP 5; use the instanceof operator instead in new code.

Otherwise looks good -- let's get the other setting patched in there and it's good to go!
Comment 2 Max Semenik 2008-06-28 20:37:38 UTC
Created attachment 5034 [details]
$wgShowExceptionDetails too
Comment 3 Chad H. 2008-06-29 00:07:56 UTC
Modified patch applied in r36775.

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