Reputation: 5657
I can't seem to find any answer to this on the web, but how can I be sure a $_POST variable or form was submitted from my site as opposed to just any old site. Is there a way to filter this?
Thanks!
Upvotes: 2
Views: 594
Reputation: 47321
To add more safeguard, you should also assign an allow period (like an hour) to expire session/token
Upvotes: 0
Reputation: 943769
Require a secret, user-specific token in all form submissions (as a hidden input) and side-effect URLs (in query strings).
If you use sessions, you can generate a token on creation of a session and store it in the session data.
Upvotes: 4