Since HTTP-REFERER can be spoofed or is not sent by some browsers/firewalls, is there a viable alternative to making sure that a script is executed by a page on your own site?
There's always a better way. The fun is trying to find it!
There is a programmatic way to handle it and a webserver way to handle this.
Programmatic:
On request log the timestamp in a file. Put the same timestamp into the URL or the form submission. On form submission make check this embedded timestamp against the timestamp on disk. if these match you are in business. The only way they can spoof you is with a brute force attack.
Using Apache and mod_rewrite you can make sure certain pages only get requests from certain other pages. Are you using apache?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.