News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

[4838] Wrong HTTP-Header created

Started by Tjati, December 02, 2010, 10:08:33 AM

Previous topic - Next topic

Tjati

Hi there,

I'm checking the smf code for my own forum and I found several things. But this one is really not fine:
	
	
header('HTTP/1.0 404 ' $txt['attachment_not_found']);

I mean - are you serios?! Holy crap. I checked it against a new zip from http://download.simplemachines.org/index.php/smf_2-0-rc4_install.zip
You found it at line 1314.
The line should be:
	
	
header($_SERVER['SERVER_PROTOCOL'].' 404 Not Found');

Not only the wrong Server Protocol could be used (compare please with http://php.net/header) also there is a text var used!
And I often see that HTTP/1.0 or HTTP/1.1 is used -> you should prefer $_SERVER['SERVER_PROTOCOL'].

Joshua Dickerson

This should be low-hanging fruit. Anyone have any reason that this should or shouldn't be changed?
Come work with me at Promenade Group



Need help? See the wiki. Want to help SMF? See the wiki!

Did you know you can help develop SMF? See us on Github.

How have you bettered the world today?

Advertisement: