From 97aa984b294cd47d3b96b0092f71af6b1611e0e3 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Thu, 3 Dec 2015 16:07:28 +0100 Subject: [PATCH] Optionally throw 404 error when contact photo wasn't found --- program/steps/addressbook/photo.inc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/program/steps/addressbook/photo.inc b/program/steps/addressbook/photo.inc index 389edc973..1d3d9506f 100644 --- a/program/steps/addressbook/photo.inc +++ b/program/steps/addressbook/photo.inc @@ -89,6 +89,9 @@ if ($data) { header('Content-Type: ' . rcube_mime::image_content_type($data)); echo $data; } +else if (!empty($_GET['_error'])) { + header('HTTP/1.0 404 Photo not found'); +} else { header('Content-Type: image/gif'); echo base64_decode(rcmail_output::BLANK_GIF);