PHP的$ _REQUEST方法是否存在安全性问题? [英] Does PHP's $_REQUEST method have a security problem?
本文介绍了PHP的$ _REQUEST方法是否存在安全性问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我读过的教科书说$ _REQUEST存在安全问题,因此我们最好使用$ _POST.
The textbook I read says that $_REQUEST has security problem so we better use $_POST.
这样可以吗?
推荐答案
我要说,将$ _POST表征为比$ _REQUEST更安全是危险的.
I would say that it is dangerous to characterise $_POST as more secure than $_REQUEST.
如果在使用数据之前未对数据进行验证和清理,则可能会造成攻击.
If the data is not being validated and sanitized before being used, you have a possible vector of attack.
简而言之: 如果数据没有以安全的方式处理,那么数据来自哪里也没关系.
这篇关于PHP的$ _REQUEST方法是否存在安全性问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文