From: Antoine Musso Date: Sun, 12 Feb 2012 19:51:03 +0000 (+0000) Subject: Fix some injection from r110871 X-Git-Tag: 1.31.0-rc.0~24746 X-Git-Url: http://git.cyclocoop.org/%27.%28%24current%20%3E%202?a=commitdiff_plain;h=1379b783aad1426ee22f17793fb212439bb60bcd;p=lhc%2Fweb%2Fwiklou.git Fix some injection from r110871 --- diff --git a/includes/cache/FileCacheBase.php b/includes/cache/FileCacheBase.php index 70bb221656..d0cbe5f018 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() ); + } } /**