Last modified: 2008-06-29 00:07:56 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 T16678, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 14678 - API ignores $wgShowSQLErrors
API ignores $wgShowSQLErrors
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
unspecified
All All
: Normal major (vote)
: ---
Assigned To: Roan Kattouw
: patch
Depends on:
Blocks:
  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: ---


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

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.


Navigation
Links