diff options
author | Antoine Musso <hashar@users.mediawiki.org> | 2012-02-12 19:51:03 +0000 |
---|---|---|
committer | Antoine Musso <hashar@users.mediawiki.org> | 2012-02-12 19:51:03 +0000 |
commit | 1379b783aad1426ee22f17793fb212439bb60bcd (patch) | |
tree | e3329ba7a2d10523f1b398459d061e4fe03123a4 /includes/cache/FileCacheBase.php | |
parent | a600f8a781a5a97754d6f15ea2ccda9f3b427e3d (diff) | |
download | mediawikicore-1379b783aad1426ee22f17793fb212439bb60bcd.tar.gz mediawikicore-1379b783aad1426ee22f17793fb212439bb60bcd.zip |
Fix some injection from r110871
Notes
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/111324
Diffstat (limited to 'includes/cache/FileCacheBase.php')
-rw-r--r-- | includes/cache/FileCacheBase.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/includes/cache/FileCacheBase.php b/includes/cache/FileCacheBase.php index 70bb22165641..d0cbe5f01852 100644 --- a/includes/cache/FileCacheBase.php +++ b/includes/cache/FileCacheBase.php @@ -116,9 +116,12 @@ abstract class FileCacheBase { * @return string */ public function fetchText() { - // gzopen can transparently read from gziped or plain text - $fh = gzopen( $this->cachePath(), 'rb' ); - return stream_get_contents( $fh ); + if( $this->useGzip() ) { + $fh = gzopen( $this->cachePath(), 'rb' ); + return stream_get_contents( $fh ); + } else { + return file_get_contents( $this-cachePath() ); + } } /** |