.. did think that but it won't stop people closing/re-opening their browser to break the session..robmiller said:Just use a session:
riddlermarc said:.. did think that but it won't stop people closing/re-opening their browser to break the session..
The aim of this isn't to protect against people, it's to protect against bot spam.riddlermarc said:.. did think that but it won't stop people closing/re-opening their browser to break the session..
You can intercept session details using a sniffer and subsequently spoof the contents of the form/$_SESSION['lastMailed'] values to infinitely loop the mail sending.Beansprout said:The aim of this isn't to protect against people, it's to protect against bot spam.
Trying to protect against people is incredibly difficult and can never be effective without harming the experience of your legitimate visitors, which is an absolute no-no![]()
robmiller said:Just use a session:
How can you sniff session valuesriddlermarc said:You can intercept session details using a sniffer and subsequently spoof the contents of the form/$_SESSION['lastMailed'] values to infinitely loop the mail sending.
I know this sounds a bit extreme, but the spammers have a pretty good arsenal at their disposal and if they find a site that's allowing emailing via a form they will have no qualms about abusing itThink how easy it would be for them to intercept session details via an intermediary box, alter them (change the "lastMailed" value by 10mins less) and then send them on their way.. it's a fairly simple job, unfortunately.
I agree it's a trade-off between usability and security though![]()
.. check out the last paragraph.With a different browser, or even an entirely different computer, go through the exact same initial steps. Upon visiting the URL for the first time, you will notice that you do not see 0. Rather, it recalls your previous session. Thus, you have impersonated the previous user. Now, if you consider that this all began with a session identifier being passed in the URL, you should see the basic danger that session fixation presents. Unlike a typical scenario, PHP did not generate the session identifier.
There are a few shortcomings to this simplistic type of attack. The most important shortcoming is that the target application must use the session identifier passed to it, otherwise this attack will fail. If your session mechanism is nothing more than session_start(), your applications are vulnerable, as the previous demonstration illustrates