为什么网络服务器需要依靠“主机”标题?
我正在尝试了解HTTP(S)标题主机
引起的漏洞。我听说Web服务员可以通过传入的请求来使用host
标题的值,以执行不同的操作,例如构造URL。例如,这里是摘录摘自:
django使用客户提供的主机标头在某些情况下构建URL。
我知道HTTP请求中的任何信息都可能不信任。 Web服务器知道他们背后的主机名。那么,为什么他们会从host
标题中拿出它,如果他们可以手动配置其主机名,则无法信任呢?
I'm trying to understand vulnerabilities arising from HTTP(S) header Host
. I heard that webservers may use the value of the Host
header from incoming requests to do different stuff such as constructing URLs. For example here is a excerpt from Django documentation:
Django uses the Host header provided by the client to construct URLs in certain cases.
I know that any information in HTTP(S) requests may not be trusted. Web servers know what host name they are behind. So why would they take it from Host
header that cannot be trusted if they can have their host name configured manually?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论