From 487f0750c8d955c7994dc6180d1f56f26e1e9bf5 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 28 Dec 2011 23:03:55 +0400 Subject: workaround against markup being broken by cache_images() --- image.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'image.php') 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"); } ?> -- cgit v1.2.3-54-g00ecf