V
V
Vitaliy Semyanchuk2014-01-29 14:22:25
CSRF
Vitaliy Semyanchuk, 2014-01-29 14:22:25

How to protect yourself from CSRF?

Good afternoon.
So I want to protect myself from CSRF, I read it, I decided to make a hidden field and generate a token there, save it to the session and then check it on the server with what came. Only one thing worries me, unless the request that will come from an attacker, for example from an iframe, will not have a session that is created when the form appears?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
[
[email protected]><e, 2014-01-29
@barmaley_exe

He can and will have a correct session, but an attacker will not be able to indicate the correct (coinciding with what is recorded in the session) token in the form, because he has no way to recognize it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question