Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
就像在 php 中一样,include()方法和allow_url_include可能容易受到 LFI 和 RFI 的攻击。
include()
allow_url_include
django 的包含是否容易受到 lfi 和 RFI 的影响?
除非你弄乱了默认的模板加载器。Django 不允许您使用include位于应用程序模板文件夹之外的文件,并尽最大努力防止您使用内置操作接触外部文件。
include
作为一般经验法则,将您的应用程序代码与用户上传文件的路径完全隔离并清理和减少用户提供的输入与潜在危险函数的交互并没有什么坏处。