Html 删除不安全的HTTP谓词,如选项
我想删除不安全的HTTP谓词,如选项。我的应用程序使用jsp、servlet。 我尝试在web.xml中使用bellow。但是,我找不到任何解决办法。你能帮我解决这个问题吗Html 删除不安全的HTTP谓词,如选项,html,jsp,security,http,servlets,Html,Jsp,Security,Http,Servlets,我想删除不安全的HTTP谓词,如选项。我的应用程序使用jsp、servlet。 我尝试在web.xml中使用bellow。但是,我找不到任何解决办法。你能帮我解决这个问题吗 <security-constraint> <web-resource-collection> <web-resource-name>NASApp</web-resource-name> <descripti
<security-constraint>
<web-resource-collection>
<web-resource-name>NASApp</web-resource-name>
<description>Security constraint for SIS</description>
<url-pattern>/unchecked/*</url-pattern>
<http-method>GET</http-method>
<http-method>HEAD</http-method>
<http-method>POST</http-method>
</web-resource-collection>
</security-constraint>
NASApp
SIS的安全约束
/未经检查/*
得到
头
邮递
下面的示例(来自)显示了如何禁用除HEAD和GET之外的所有方法
<security-constraint>
<web-resource-collection>
<web-resource-name><strong>restricted methods</strong></web-resource-name>
<url-pattern>/*</url-pattern>
<http-method>PUT</http-method>
<http-method>POST</http-method>
<http-method>DELETE</http-method>
<http-method>OPTIONS</http-method>
<http-method>TRACE</http-method>
</web-resource-collection>
<auth-constraint />
</security-constraint>
受限方法
/*
放
邮递
删除
选择权
痕迹
因此,在您的情况下,您将只排除您希望允许的动词
另请注意url模式*以匹配所有url。为什么选项不安全?当发出选项方法时,Web服务器将返回所有受支持的方法,攻击者可以获得信息。感谢您的回复。它不起作用。你还有别的解决办法吗?