From 6d9cf82f1309e1d8991713c407fe112ae3b2c3ea Mon Sep 17 00:00:00 2001 From: Jared Hancock <jared@osticket.com> Date: Wed, 4 Sep 2013 13:51:56 +0000 Subject: [PATCH] Use the correct Content-Type header for CAPTCHA Some security inspection appliances and load balancers don't appreciate something in the HTTP headers that is not a valid HTTP header. Furthermore, the browser needs the Content-Type header to identify that the image is not the PHP default of text/html --- include/class.captcha.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/class.captcha.php b/include/class.captcha.php index ca103d920..86f89d979 100644 --- a/include/class.captcha.php +++ b/include/class.captcha.php @@ -3,7 +3,7 @@ class.captcha.php Very basic captcha class. - + Peter Rotich <peter@osticket.com> Copyright (c) 2006-2013 osTicket http://www.osticket.com @@ -44,7 +44,7 @@ class Captcha { $img= imagecreatefrompng($this->bgimg); imagestring($img,$this->font, $x, $y,$this->hash,imagecolorallocate($img,0, 0, 0)); - Header ("(captcha-content-type:) image/png"); + header("Content-Type: image/png"); imagepng($img); imagedestroy($img); $_SESSION['captcha'] = md5($this->hash); -- GitLab