Fix some injection from r110871
[lhc/web/wiklou.git] / includes / cache / FileCacheBase.php
index 70bb221..d0cbe5f 100644 (file)
@@ -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() );
+               }
        }
 
        /**