diff --git a/plugins/af_zz_imgproxy/init.php b/plugins/af_zz_imgproxy/init.php index 5d9a96ac3..6d7954c3c 100644 --- a/plugins/af_zz_imgproxy/init.php +++ b/plugins/af_zz_imgproxy/init.php @@ -35,6 +35,12 @@ class Af_Zz_ImgProxy extends Plugin { $url = rewrite_relative_url(SELF_URL_PATH, $_REQUEST["url"]); $kind = (int) $_REQUEST["kind"]; // 1 = video + // called without user context, let's just redirect to original URL + if (!$_SESSION["uid"]) { + header("Location: $url"); + return; + } + $extension = $kind == 1 ? '.mp4' : '.png'; $local_filename = CACHE_DIR . "/images/" . sha1($url) . $extension;