PHP 5.4 中是否有 safe_mode 的替代方案?
PHP 5.4 finally removed safe_mode and magic quotes.
Are there any alternatives to them? To enhance the security level?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为删除这些功能的目的是 PHP 开发团队承认在应用程序堆栈中实现安全功能/机制并不是保护 Web 应用程序安全的灵丹妙药。
不应该用直接的代码/配置来替代 PHP 中的这些功能。相反:
register_globals
和magic_quotes
等功能这样做一视同仁。safe_mode
限制内置函数的可访问性和功效。我确信有人会尝试弄清楚如何重新创建这些功能,并且会有很多后期采用者选择保留 PHP 的早期版本,而不是直接解决安全问题。但如果您确实担心安全性,请不要寻找捷径。
I think the point of removing these features is that the PHP development team acknowledges that implementing security features/mechanisms in the application stack is not a panacea for securing Web applications.
There shouldn't be direct code/configuration substitutes for these features in PHP. Instead:
register_globals
andmagic_quotes
do so indiscriminantly.safe_mode
limit the accessiblity and efficacy of built-in functions.I'm sure someone will try to figure out how to re-create these features, and there will be a lot of late adopters that choose to stay on earlier versions of PHP instead of addressing security directly. But if you really are concerned about security, don't look for shortcuts.