We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 492d76a commit d72de0cCopy full SHA for d72de0c
307.md
@@ -270,7 +270,9 @@ XSRF的含义是Cross-site request forgery,即跨站请求伪造,也称之
270
});
271
272
273
-函数getCookie()的作用是得到cookie值,然后将这个值放到向后端post的数据中`var pd = {"username":user, "password":pwd, "_xsrf":getCookie("_xsrf")};`。
+函数getCookie()的作用是得到cookie值,然后将这个值放到向后端post的数据中`var pd = {"username":user, "password":pwd, "_xsrf":getCookie("_xsrf")};`。运行的结果:
274
+
275
+
276
277
这是tornado提供的XSRF防护方法。是不是这样做就高枕无忧了呢?<strong>没这么简单。要做好一个网站,需要考虑的事情还很多</strong>。特别推荐阅读[WebAppSec/Secure Coding Guidelines](https://wiki.mozilla.org/WebAppSec/Secure_Coding_Guidelines)
278
3images/30704.png
92.7 KB
0 commit comments