Lift 是否可以防止 HTTP 响应分裂?

发布于 2024-12-06 13:34:29 字数 166 浏览 3 评论 0原文

当我使用 S.setHeader 手动将标头添加到 Lift 中的响应时,是否必须手动检查换行符,还是由框架完成?这是为了防止 http 响应分裂

When I manually add a header to a response in Lift with S.setHeader, do I have to check for newlines manually or is that done by the framework? This is needed to prevent http response splitting.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

你又不是我 2024-12-13 13:34:29

你应该测试一下。 Firefox 的篡改数据允许您修改http 请求并查看响应。设置对 S.setHeader 的调用以接受 get 变量标头。在 Firefox 中打开篡改数据,它将记录所有请求。访问如下网址: http://localhost/?header=1%0atest:+CRFL。如果篡改数据显示带有新服务器元素 test: CRLF 的响应标头,那么您的平台很容易受到 HTTP 响应拆分的影响。

You should test it. Tamper Data for Firefox allows you to modify http requests and view the response. Setup a call to S.setHeader that accepts a get variable header. Open tamper data within Firefox and it will log all requests. Visit a url like this: http://localhost/?header=1%0atest:+CRFL. If tamper data shows a response header with a new server element of test: CRLF then your platform is vulnerable to HTTP response splitting.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文