简体   繁体   English

django的CSRF是否会影响iOS程序?

[英]Does django's CSRF affect iOS program?

I have met this problem today when I try to post data to django from iOS program: I try to post data to django,but only to find that there exists error "csrf cookie not set",I have solved this problem by forbidding the CSRF function (@csrt_exempt) 今天,当我尝试从iOS程序将数据发布到django时遇到了这个问题:我尝试将数据发布到django,但是却发现存在错误“未设置csrf cookie”,我通过禁止CSRF解决了这个问题功能(@csrt_exempt)
but I want to know, if that would bring safety problem to my porgram? 但是我想知道,这是否会给我的porgram带来安全性问题?
if it would, and is there anyone can tell how to solve it ? 如果可以,还有没有人可以告诉您如何解决?

PS:post from iOS to django PS:从iOS发布到Django

Your application will be vulnerable to CSRF https://en.wikipedia.org/wiki/Cross-site_request_forgery 您的应用程序容易受到CSRF https://en.wikipedia.org/wiki/Cross-site_request_forgery的攻击

Have a look at this reply: https://stackoverflow.com/questions/21052956/feed-django-web-server-with-desktop-program-data/21095734#21095734 看看这个回复: https : //stackoverflow.com/questions/21052956/feed-django-web-server-with-desktop-program-data/21095734#21095734

The solution use some python code but you should be able to do that with your iOS framework 该解决方案使用一些python代码,但是您应该能够使用iOS框架来做到这一点

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM