如何避免对Oracle WebLogic Server的host header攻击

The redirect-with-absolute-url option in weblogic.xml

可以将weblogic.xml中的redirect-with-absolute-url选项设置为“ false”以避免HOST Header受到攻击,但是有一些注意事项:

  • 必须在HTTP / 1.1规范RFC2616和Servlet规范的重定向响应的“Location”Header中使用绝对URL。
  • 在更新的HTTP / 1.1规范RFC7230中,允许在重定向响应的“位置”Header中使用相对URL(更安全)。

WebLogic在应用程序的weblogic.xml中提供配置“ redirect-with-absolute-url”,默认值为“ true”。 位置Header以以下两种方式起作用,即是非:

  • 如果将“ redirect-with-absolute-url”选项配置为“ true”,则将在Location:Header中使用绝对URL。
  • 如果将“ redirect-with-absolute-url”选项配置为“ false”,则将在Location:Header中使用相对URL。

发表评论