summaryrefslogtreecommitdiff
path: root/image.php
diff options
context:
space:
mode:
Diffstat (limited to 'image.php')
-rw-r--r--image.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/image.php b/image.php
index d240dbc68..89d05d660 100644
--- a/image.php
+++ b/image.php
@@ -4,12 +4,14 @@
require_once "config.php";
- $filename = CACHE_DIR . '/images/' . sha1($_GET['url']) . '.png';
+ $url = base64_decode($_GET['url']);
+
+ $filename = CACHE_DIR . '/images/' . sha1($url) . '.png';
if (file_exists($filename)) {
header("Content-type: image/png");
echo file_get_contents($filename);
} else {
- header("Location: " . $_GET['url']);
+ header("Location: $url");
}
?>