| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
And namesapce them:
- StreamFile
- OutputHandler
- OutputPage
Bug: T321882
Change-Id: Iedf8d88c595e580f2d8f0734c92aa5c45618ba33
|
|
|
|
|
|
|
|
|
| |
This reverts commit 2bdc0b2b7209441a42a784157633a8a01b321922.
Reason for revert: T166010#8349431
Bug: T166010
Change-Id: Idcd3025647aec99532f5d69b9c1718c531761283
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Moving:
- DerivativeRequest
- FauxRequest
- FauxRequestUpload
- PathRouter
- WebRequest
- WebRequestUpload
Bug: T166010
Change-Id: I5ea70120d745f2876ae31d039f3f8a51e49e9ad8
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove Flash cross-domain policy mangling. Users who are somehow still
using Flash as a browser extension will be exposed to CSRF
vulnerabilities.
Deprecate the config since deprecation has some advantages in the new
config system over simple removal.
Bug: T279496
Change-Id: I2c0e85a430d7e6aaf8d5decd00cf1dade04cebe1
|
|
|
|
|
|
|
|
|
|
|
| |
Use name constants instead of string literals in calls to Config::get
and ServiceOptions::get, when referring to core configuration variables.
This protects against typos and makes the decumentation and schema
declaration of the config settings discoverable.
This is the first batch, only touching files directly under /includes/
Change-Id: I7252e636c7c86d950d9257b33491af492c6dd5eb
|
|
|
|
|
|
|
|
|
|
|
|
| |
Automatically refactors wg prefixed globals to use MediaWikiServices config using Rector. Doesn't include files that set globals or files that fail CI.
Rector Gist: https://gist.github.com/tchin25/7cc54f6d23aedef010b22e4dfbead228
* This patch uses a modified source code rector library for our specific use case and the rector will have different effects without it.
A writeup for future reference is here: https://meta.wikimedia.org/wiki/User:TChin_(WMF)/Using_Rector_On_MediaWiki
Change-Id: I1a691f01cd82e60bf41207d32501edb4b9835e37
|
|
|
|
|
| |
Bug: T254646
Change-Id: I2b120f0b9c9e1dc1a6c216bfefa3f2463efe1001
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Folllows-up I4c2d478b492ff17.
* MW_ENTRY_POINT can only be undefined in very early WebStart/Setup
code. In code outside those files, and by the time MW_SETUP_CALLBACK
OutputHandler run, this is always filled in to at least "unknown".
* Inline extra code to the less common conditional block.
Bug: T290776
Change-Id: Ia7fa6cb0ff156ed6cb0212443ac3a97c91982d4b
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The config variable check from 6c81f0b868d2 needed a negation.
The phase check from 374bdc0f7c790d should have been a conjuction.
Also add some debug logging statements.
Follow-up to 6c81f0b868d2 and 374bdc0f7c790d.
Bug: T290776
Change-Id: I4c2d478b492ff17bdad76bf75119b5926f7917e8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Revert "Disable DEFER_SET_LENGTH_AND_FLUSH headers to avoid HTTP
errors"
* Reapply "Avoid HTTP protocol errors when fastcgi_finish_request() is
unavailable"
* Reapply "Move logDataPageOutputOnly() call to
outputResponsePayload()"
This reverts commit 0393ddbb2a08a4d278b1d0ef65b1f4c391d769b5.
This reverts commit 89065a22aac744363dc528f73423a2f37d73ce14.
This reverts commit e70757f58b9a3252882f3d3b516f23cd7c61430e.
Change-Id: I8a362a80bb1aa147192218a37df34aadba34fb2e
|
|
|
|
|
|
|
|
|
|
| |
Replace the global variable hack in wfResetOutputBuffers() with a check
for the PHP_OUTPUT_HANDLER_CLEAN flag in the $phase parameter, available
since PHP 5.4.0. Aaron's Content-Length patch will work if applied on top
of this.
Bug: T278579
Change-Id: I9ec12f499821826038a39ebe94eed136f123b078
|
|
|
|
|
|
|
| |
This reverts commit f4f0ad970e08ddeb1795e74dbf0230019a850a7b.
Bug: T278579
Change-Id: I3071209eff16b5dcc853f497a243a9af0883b67a
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes problem that arise with apache2/mod_php due to deferred updates
* Do not send unnecessary and invalid "Content-Encoding: identity" header
* Do not send "Connection: close" if HTTP2 is detected (per the HTTP spec)
pending, which reduces the use of output buffer and HTTP header tricks
* Make sure that no output is emitted in doPostOutputShutdown() from any
deferred updates since the response will have already been flushed to
the client by that point
* Make the Content-Length header logic in outputResponsePayload() account
for cases where there is a non-empty output buffer, cases where there
are several output buffers (bail out), and limit the use of the header
to HTTP 200/404 responses (avoids violation of the HTTP spec)
* Make sure OutputHandler::handle() does not send payloads for responses
that must not have one (e.g. "204 No Content")
* If an output buffer using OutputHandler::handle is active, then let it
handle the setting of Content-Length rather than outputResponsePayload()
* Do not bother trying to disable zlib.output_compression, since that did
not actually stop the client from getting blocked
* Set "no-gzip" via apache_setenv() unconditionally
Bug: T235554
Change-Id: I26f16457698c2c45e561b0c79c78a74e7f47126c
|
|
|
|
|
|
|
|
|
| |
No need for three or more slashes
Except in some places where a bunch more are
used for drawing attention to something
Change-Id: Ic90358eb89a14a04d2b66c48e52e8fb20de0eb04
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A terminating line break has not been required in wfDebug() since 2014,
however no migration was done. Some of these line breaks found their way
into LoggerInterface::debug() calls, where they mess up the formatting
of the debug log.
So, remove terminating line breaks from wfDebug() and
LoggerInterface::debug() calls.
Also:
* Fix the stripping of leading line breaks from the log header emitted
by Setup.php. This feature, accidentally broken in 2014, allows
requests to be distinguished in the log file.
* Avoid using the global variable $self.
* Move the logging of the client IP back to Setup.php. It was moved to
WebRequest in the hopes that it would not always be needed, however
$wgRequest->getIP() is now called unconditionally a few lines up in
Setup.php. This means that it is put in its proper place after the
"start request" message.
* Wrap the log header code in a closure so that variables like $name do
not leak into global scope.
* In Linker.php, remove a few instances of an unnecessary second
parameter to wfDebug().
Change-Id: I96651d3044a95b9d210b51cb8368edc76bebbb9e
|
|
|
|
|
|
|
|
| |
These implemented a since-abandoned draft IETF spec, and the code was
broken due to (1) case-(in)sensitivity issues with the Accept-Language
header and (2) the BCP47 language code compatibility workaround we use.
Change-Id: Ia53d07cd8ce8ab1497294ea244c13c7499f632c7
|
|
|
|
|
|
|
|
|
|
|
|
| |
The nice thing about explode() is that the resulting array is
guaranteed to contain at least one element. The array can not be
empty.
In some of these cases it might be possible to use strstr() instead,
but that returns an empty string when the needle character is not
found. explode() returns the original string in this case.
Change-Id: I6ad1f3273defeaf36e2305fd871eaaf9d3c1e134
|
|
|
|
|
| |
Bug: T191670
Change-Id: If13d02ee1b30fec1c701226af9d363c6e08b3737
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Convert OutputHandler.php from global functions to a class.
- wfOutputHandler → OutputHandler::handle
(no alias, no usage outside core)
- wfGzipHandler → OutputHandler::handleGzip
(private, no usage outside class)
- wfRequestExtension → OutputHandler::findUriExtension
(private, no usage outside class)
- wfMangleFlashPolicy → OutputHandler::mangleFlashPolicy
(private, no usage outside class)
- wfDoContentLength → OutputHandler::emitContentLength
(private, no usage outside class)
- wfHtmlValidationHandler → OutputHandler::validateAllHtml
(private, no usage outside class)
* Add the class to autoload.php for exposure outside WebStart.
Specifically, for use in ApiFormatPhpTest. This also removes the
need to manually load the class because this code runs after
Setup.php loads AutoLoader.php.
Bug: T189966
Change-Id: I27a41ec0ae0ee30aeb313a616323b967605c4055
|
|
|
|
|
|
| |
Organize phpcs.xml a bit
Change-Id: Ifb767729b481b4b686e6d6444cf48b1f580cc478
|
|
|
|
|
|
|
|
|
| |
Take into account that the tag might have parameters.
Bug: T123653
Change-Id: Ie9799f5ea45badfb4e7b4be7e7fbc1c35cc86f26
Signed-off-by: Chad Horohoe <chadh@wikimedia.org>
|
|
|
|
|
|
|
|
|
|
| |
Per wikitech-l consensus:
https://lists.wikimedia.org/pipermail/wikitech-l/2016-February/084821.html
Notes:
* Disabled CallTimePassByReference due to false positives (T127163)
Change-Id: I2c8ce713ce6600a0bb7bf67537c87044c7a45c4b
|
|
|
|
| |
Change-Id: Idcc528daf28e119349155d36e30a9bcf61b2e7d5
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
MediaWiki currently has support for a header called X-Vary-Options
(XVO), used to communicate to upstream caches more granular cache
variance options than the Vary header can.
The header was envisioned by Tim Starling back in 2008 and implemented
into MediaWiki and Squid 2.0, with those patches submitted to the
squid-dev mailing list at the time:
http://www.squid-cache.org/mail-archive/squid-dev/200802/0085.html
The patches never actually made it into an upstream Squid release,
however, and Squid has since evolved in potentially significant ways.
Wikimedia has since switched to Varnish but XVO was not ported over as
it was deemed too complex at the time; custom VCL was used instead. To
our knowledge, noone else is using XVO in production and certainly not
with recent, up-to-date MediaWiki releases.
There is currently work at IETF's httpbis working group for a "Key"
header that is in concept and implementation very similar to Tim's XVO
header: https://datatracker.ietf.org/doc/draft-fielding-http-key/
Rather than rip XVO out of MediaWiki, replace it with support for the
Key header, as preliminary defined by the draft spec. This is an almost
straight search-and-replace.
No other software (caching proxy or user-agent) currently implements Key
to my knowledge, so this is essentially untested.
Change-Id: I949fc289dd5d48bd34f3b37f7739e2b9cd5db277
|
|
|
|
|
|
| |
As of RFC 2616 sec 4.2, http header names are case insensitive.
Change-Id: Ib72df2572f5a9c825c5b3ad7735126f3687aad79
|
|
|
|
|
|
|
|
| |
Add $wgMangleFlashPolicy so sites that define a safe master flash
policy can disable mangling of the <cross-domain-policy> string.
Bug: 66776
Change-Id: Ic0db939aae9d0bb6bdfc3cd9ce282661bad46783
|
|
|
|
| |
Change-Id: I59fa9af7b16e0a5a4eb8a5cc764a605b18137316
|
|
|
|
|
|
|
|
|
| |
Swapped some "$var type" to "type $var" or added missing types
before the $var. Changed some other types to match the more common
spelling. Makes beginning of some text in captial.
Also added some missing @param.
Change-Id: I7f605aa9e117b5fd80d9b1440864fe526d2b14a5
|
|
|
|
|
|
|
|
| |
apache_request_headers() does not exists
Changed apache_request_headers() to headers_list() since the latter is always available
Change-Id: Ia52f5a0d12db0680aa03b57dd45c974291e88af9
|
|
|
|
|
|
|
|
|
|
|
| |
* $wgHtml5 = false; is now ignored completely.
* $wgDocType and $wgDTD have been removed.
* $wgXhtmlDefaultNamespace is now ignored.
* XHTML5 will be output if $wgMimeType is set to an XML mime type (according to HTML5's rules).
* For backwards compatibility with extensions $wgHtml5 and $wgXhtmlDefaultNamespace are set
in Setup.php but depending on them is deprecated.
Change-Id: Iad9634e2ee420b5a3bbffe550421fde4fa1819b0
|
|
|
|
|
|
|
| |
Added spaces before if, foreach
Added some braces for one line statements
Change-Id: Ibb8dd102db045522d12ff939075ba7420d95ab6b
|
|
|
|
|
|
|
|
|
| |
* Ran spell-checker over code comments in /includes/
* A few spellchecking fixes for wfDebug() calls
Found one very strange (NOOP?) line in Linker.php - see "TODO: BUG?"
Change-Id: Ibb86b51073b980eda9ecce2cf0b8dd33f058adbf
|
|
|
|
| |
Change-Id: I1ce7605a7c8503aed37ed9b3e7c3f3c13083db6f
|
|
|
|
| |
Change-Id: I00f369641320acd7f087427ef031f3ee7efa0997
|
|
|
|
|
|
| |
Also made file/class documentation more consistent.
Change-Id: Ia45d0756cd84138da267bf1cbd1a58be7f28c6d1
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/111026
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/89047
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/88531
|
|
|
|
|
|
|
| |
http://svn.wikimedia.org/doc/todo.html nicely.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/88355
|
|
|
|
|
|
|
|
| |
* Added some descriptions
* Added @file where needed
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/71078
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/69770
|
|
|
|
|
|
|
|
| |
There is no reason to use this in HTML in addition to the lang
attribute. No spec requires it (AFAIK) and it's completely redundant.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/62312
|
|
|
|
|
|
|
|
|
| |
reimplementing it.
$wgUseGzip check on wfClientAcceptsGzip() is removed since HTMLFileCache (the only wfClientAcceptsGzip() user) already checked that before calling it. This way, $wgUseGzip stays applying only for file cache, and $wgDisableOutputCompression for output handler.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/61054
|
|
|
|
|
|
|
| |
Notice: Undefined index: HTTP_ACCEPT_ENCODING in GlobalFunctions.php on line 1175
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/60871
|
|
|
|
|
|
|
| |
wfGzipHandler should use wfClientAcceptsGzip() instead of reimplementing it. Patch does this and removes the $wgUseGzip check on wfClientAcceptsGzip() since HTMLFileCache (the only wfClientAcceptsGzip() user) already checked that before calling it. This way $wgUseGzip stays applying only for file cache, and $wgDisableOutputCompression for output handler.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/60864
|
|
|
|
|
|
|
| |
command
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/60093
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/59080
|
|
|
|
|
|
|
| |
* http://spreadsheets.google.com/pub?key=t-EjyzEfh0t39hoQbf-a5fw
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/55654
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/46348
|
|
|
|
|
|
|
| |
/var/www/w/includes/parser/Parser.php on line 378
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/46347
|