Commit graph

149 commits

Author SHA1 Message Date
Sam Reed
f985524076 More versions added to @deprecated tags
Couple of inbound calls fixed up

Some ancient code removed as it's been marked deprecated
2011-05-06 21:50:18 +00:00
Tim Starling
1db9197660 * Fix for bug 28534: IE 6 content type detection again
* Fix for bug 28639: user object instance cache pollution
* Release notes formatting tweak.
2011-05-05 05:29:50 +00:00
Alexandre Emsenhuber
4207ab0c63 * (bug 28511) Use [] syntax instead of {} for string offset access 2011-04-17 07:59:58 +00:00
Niklas Laxström
6d43e71d2a Fix regression introduced in r82451. Only happens when getAllHeaders was not called before LanguageSelector hook was executed, not sure in which conditions this happens or not. 2011-04-14 11:58:52 +00:00
Tim Starling
7aeb423a6e (bug 28507) Fix for r85844: that revision was not actually sufficient to fix bug 28235, since URLs can have more than one question mark in them. 2011-04-14 07:10:59 +00:00
Tim Starling
ccb27f0b59 Check all MSIE requests since we also want to protect IE 3-5 etc. 2011-04-12 01:26:17 +00:00
Tim Starling
3ef857fe4d Fix for bug 28235: IE6 looks for the file extension in the query string 2011-04-12 00:55:10 +00:00
Alexandre Emsenhuber
60f1302644 Per Platonides, fix for r82686: make ApiUploadTest work again
Added option request parameter to User::editToken() and User::matchEditToken() and use them where possible from the api.
Also removed $_SESSION usage since it's no longer needed
2011-03-02 12:52:47 +00:00
Alexandre Emsenhuber
7a62c8d542 Factorise common code:
* Made appendQuery() use appendQueryArray() by using wfCgiToArray()
* Introduced getQueryValues() to get values passed in the query string; FauxRequest will return an empty array when faking a POST request
2011-02-23 20:23:35 +00:00
Alexandre Emsenhuber
8e7741c77d Merged retrieval of request URL and header from WebRequest and Setup.php to avoid duplicate code and reduced the number of wfDebug() calls in Setup.php.
The only side effect is that headers name are in uppercase in the debug log.
2011-02-19 13:09:17 +00:00
Mark A. Hershberger
0677934401 * recover dropped check of $wgUsePathInfo from r81363
* document getPathInfo
2011-02-02 15:44:37 +00:00
Sam Reed
49b6b1cc61 Followup r81373, r81363
PHP Notice:  Undefined variable: matches in /home/ci/cruisecontrol-bin-2.8.3/projects/mw/source/includes/WebRequest.php on line 109

Explicitally define $matches at top of function, allowing it to always be defined for all paths
2011-02-02 13:02:45 +00:00
Mark A. Hershberger
72dd2cf8c6 follow up r81363 and fix Bug#27099 2011-02-02 03:14:37 +00:00
Mark A. Hershberger
9de57fff82 * Remove last bit of code that uses PATH_INFO from img_auth.php so that people who want to use protected images on hosts with sadly mis-shapen PHPs (e.g. GoDaddy) can.
* Mangle PATH_INFO handler in WebRequest so that all the relevant bits are in a (couple of) static functions.
2011-02-02 01:08:15 +00:00
Mark A. Hershberger
a2ec67cfb5 Whitespace cleanup 2011-02-01 23:08:10 +00:00
Sam Reed
4ee5d368db Followup r72119, add some braces
Document $db in parserTest
2011-01-07 00:55:09 +00:00
Ilmari Karonen
fec364732f followup r78209: fix typo, better word choice 2010-12-10 22:42:46 +00:00
Ilmari Karonen
75086e9f35 (bug 16019) Make WebRequest::interpolateTitle() do nothing when run from api.php 2010-12-10 22:39:17 +00:00
Chad Horohoe
f3054e5787 Drop silly $_ prefix from 4.x days 2010-11-05 12:59:37 +00:00
Chad Horohoe
0f149cf548 Document return type. Autosuggestion and the like :) 2010-11-05 12:54:58 +00:00
Trevor Parscal
dc723fc710 * Improved on r73567, this makes WebRequest::getFuzzyBool case insensitive, making 'false', 'FALSE', 'FaLsE', etc to be boolean false
* Fixed syntax error in Skin.php
2010-09-27 15:59:58 +00:00
Chad Horohoe
e4189f5920 Fix a bunch of '? true : false' instances 2010-09-27 14:24:13 +00:00
Trevor Parscal
6de8690746 * Added WebRequest::getFuzzyBool, which is a more JavaScript friendly version of getBool. Essentailly the same thing, except the string 'false' is also considered boolean false.
* Made use of getFuzzyBool where otherwise awkward and sometimes varied versions of 'flase' === false detection were being used.
2010-09-22 20:15:31 +00:00
Sam Reed
ecf56c33fa Braces and spaces 2010-09-04 03:43:33 +00:00
Mark A. Hershberger
3751511ff0 fill out appendQuery() for FauxRequest — probably should be refactored
into the parent class, but the parent uses $_GET where we have $this->data
2010-09-01 16:58:44 +00:00
Ryan Kaldari
aaa70d34ac Fixing comment so that method documentation isn't broken 2010-08-31 00:33:14 +00:00
Alexandre Emsenhuber
7b79d94515 * Standardised file description headers
* Added some descriptions
* Added @file where needed
2010-08-14 17:42:40 +00:00
Chad Horohoe
aa7b63ce83 Cleanup getCookie() and use it all over the place instead of using $_COOKIE directly 2010-08-06 15:00:43 +00:00
Platonides
4467d11a46 Follow up r70356.
Improve WebRequest getAcceptLang(): Add support for q=0 language and the special range "*", always return the language codes in lowercase.
2010-08-03 13:23:31 +00:00
Max Semenik
07760f5799 Follow-up to r64587:
* Use WebRequest::getAcceptLang() instead of home-brewed code (and in LanguageConverter too).
* Refactored that function to use getHeader()
2010-08-02 20:16:36 +00:00
Platonides
268bf91615 Remove the require for UtfNormal.php
From r60599, this calls $wgContLang->normalize(), not UtfNormal::cleanUp(),
2010-07-30 22:35:02 +00:00
Bryan Tong Minh
b62d5dbad7 Follow-up r70037: Move isIniSizeOverflow magic to WebRequestUpload 2010-07-27 20:54:34 +00:00
Bryan Tong Minh
546a55a79d (bug 23380) Uploaded files that are larger than allowed by PHP now show a useful error message.
Introduced a WebRequestUpload class which is a wrapper around $_FILES and contains all getUpload* and getFile* methods. This has as advantage that the upload can be passed along without $wgRequest. Also because I like objects.
2010-07-27 20:38:36 +00:00
Sam Reed
5fd23ed8b5 More unused globals 2010-07-25 17:47:41 +00:00
Roan Kattouw
a973430991 Followup to r67554: move getAcceptLang() to WebRequest for general use, per CR. 2010-06-18 18:00:54 +00:00
Jack D. Pond
eb03fbf100 (Bug 23767) - PHP warning/error when REQUEST_URI returns blank (IIS issue) 2010-06-10 19:00:07 +00:00
Alexandre Emsenhuber
5a85150d86 * Fixed documentation added in e66901
* Cleaned up a bit the doc
2010-05-28 20:20:00 +00:00
Chad Horohoe
8da9785fc9 Add getCookie(). Stuff should use this now instead of accessing $_COOKIE directly 2010-05-26 00:50:46 +00:00
Mark A. Hershberger
bd3faaeb15 * Fix a bug to keep consecutive HTTP requests from sharing results
* Update Login API
2010-04-09 05:25:40 +00:00
Chad Horohoe
fd812c83f0 Followup r62231, reduce code duplication in $request->response() 2010-02-10 10:49:17 +00:00
Mark A. Hershberger
c74fe71cd8 * new FauxResponse class to help with unit testing
* Add append() method to FileRepo classes to enable chunked uploading
* Change chunksessionkey to chunksession
* Remove echo json stuff
* Fix a multitude of bugs in my own code
* still to test: mwEmbed use of chunked upload
2010-02-10 10:36:11 +00:00
Mark A. Hershberger
dcdc0f4dc7 New tests for LanguageConverter->getPreferredVariant()
Refactor getPreferredVariant, new function getHeaderVariant()
New function (FauxRequest::setHeader()) to help with testing.
2010-01-06 03:50:59 +00:00
Mark A. Hershberger
9ef63ede49 Random eol whitespace found while treking through files.
Removing unused call to $wgContLang->getFormattedNsText() from addNewUserLogEntry()
2010-01-06 03:42:30 +00:00
Tim Starling
ad19c032b0 Fix for bug 9413 and the related Malayalam issue reported on wikitech-l.
* Added $wgFixArchaicUnicode, which, if enabled, converts some deprecated Unicode sequences in Arabic and Malayalam text to their Unicode 5.1 equivalents.
* Added generateNormalizerData.php to generate the relevant data files. Added the generated data files also. 
* Made most things call the new wrapper method $wgContLang->normalize() instead of UtfNormal::cleanUp(), so that Unicode normalization can be customised on a per-language basis.
* Added some generic support for conversion tables to Language so that subclasses can easily implement these kinds of transformations.
2010-01-04 08:28:50 +00:00
Alexandre Emsenhuber
c3ec19debc Replaced all @fixme with "@todo Fixme" since doxygen doesn't have a @fixme command 2009-12-15 21:26:58 +00:00
Chad Horohoe
a4e5e935b6 Mass convert NULL -> null. Left strings and comments alone, obviously. 2009-12-11 21:07:27 +00:00
Brion Vibber
77f1f0ace7 No need to store the value of the magic quotes check here; just use a local var for clarity. 2009-08-21 21:26:34 +00:00
Tim Starling
07efbeb8ae * Fixed XSS vulnerability introduced by r49833. Only pre-release versions of MediaWiki were affected.
* Refactored the IE script entry point security check into WebRequest::isPathInfoBad(). Use the standard CGI variable PATH_INFO to do this check instead of the various potential non-standard solutions. Made the check fairly permissive to avoid a repeat of bug 13049 due to broken CGI setups especially with cgi.fix_pathinfo=0. This should theoretically be very portable and secure, but I have not tested it widely.
* Removed Chris Wrinn from the credits since his patch was wrong and has been removed.
* Made the error message more informative.
2009-08-17 13:23:45 +00:00
Chad Horohoe
9216c191fe Make $headers protected and declare it as an empty array. 2009-07-25 00:27:56 +00:00
Chad Horohoe
4efd3ebcb9 ; 2009-07-25 00:17:21 +00:00