I'm a PHP developer learning Ruby on Rails by reading Michael Hartl's tutorial. Here is a quote from the book, referring to csrf_meta_tag
:
...the Rails method csrf_meta_tag
[prevents] cross-site request
forgery (CSRF), a type of malicious web attack. Don’t worry about the
details (I don’t); just know that Rails is working hard to keep your
application secure.
The thing is, I'm genuinely curious. How does inserting csrf-param
and csrf-token
meta tags prevent CSRF? I tried Googling, but couldn't find anything.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…