A
A
Andrey Salnikov2017-06-23 13:08:42
JavaScript
Andrey Salnikov, 2017-06-23 13:08:42

What to do with CSRF?

I want to authorize on the site using request-promise. But the site has CSRF tokens.
I do this - request to the page, take the token and again make a request to the same page, but with all the data. The answer is CSRF attack detected. What to do and in which direction to dig?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Aksentiev, 2017-06-23
@Sanasol

In such a scenario, it seems to be generally possible to simply turn it off.
The whole point of CSRF is to make it so easy to slap a request to someone else's site.
And in such a scenario, it turns out to throw a request twice = protection passed. Well, if it worked the way you wanted it to.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question