From 2e9415126b69fa186b22ef525ce29e79ce5845b2 Mon Sep 17 00:00:00 2001 From: Chris Kankiewicz Date: Mon, 9 Oct 2017 22:30:49 -0700 Subject: [PATCH] Changed File base cache file extensions from '.cache' to '.cache.php' to help prevent rendering as plaintext if viewed through a web-server --- src/Drivers/File.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Drivers/File.php b/src/Drivers/File.php index cfc04e3..0bbfe08 100644 --- a/src/Drivers/File.php +++ b/src/Drivers/File.php @@ -180,7 +180,7 @@ public function forget($key) */ public function flush() { - $unlinked = array_map('unlink', glob($this->storagePath . DIRECTORY_SEPARATOR . '*.cache')); + $unlinked = array_map('unlink', glob($this->storagePath . DIRECTORY_SEPARATOR . '*.cache.php')); return count(array_keys($unlinked, true)) == count($unlinked); } @@ -194,7 +194,7 @@ public function flush() */ protected function filePath($key) { - return $this->storagePath . DIRECTORY_SEPARATOR . sha1($this->prefix($key)) . '.cache'; + return $this->storagePath . DIRECTORY_SEPARATOR . sha1($this->prefix($key)) . '.cache.php'; } /**