Skip to content
Snippets Groups Projects
Commit f7ea0117 authored by Jared Hancock's avatar Jared Hancock
Browse files

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
parent acd4f06d
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment