While reading an article I encounter an interesting thing I did not know about:
if(!isset($_SESSION['usr_id']) || !isset($_SESSION['usr_name']))
{
header('Location: index.php');
}
...Which is all well and good if the client respects the Location header. The crawler apparently doesn't, because it doesn't really have to. The bad thing is that any crawler, bot, or browser that can ignore headers could bypass all security on their site.
I do believe that it is true, but I was wondering how I can replicate the results. Basically how can I test that the browser, crawler or something else is ignoring header?
I am not sure whether this question belongs here or to stackoverflow, but I think that due to the nature of this site, there is higher probability that people know how to bypass this.
die()or anexit()call after sending the location header. You should stop execution after the client gets redirected.