From 1379b783aad1426ee22f17793fb212439bb60bcd Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Sun, 12 Feb 2012 19:51:03 +0000 Subject: [PATCH] Fix some injection from r110871 --- includes/cache/FileCacheBase.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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() ); + } } /** -- 2.20.1