Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/75.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/jsf/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 删除不安全的HTTP谓词,如选项_Html_Jsp_Security_Http_Servlets - Fatal编程技术网

Html 删除不安全的HTTP谓词,如选项

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

我想删除不安全的HTTP谓词,如选项。我的应用程序使用jsp、servlet。 我尝试在web.xml中使用bellow。但是,我找不到任何解决办法。你能帮我解决这个问题吗

<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服务器将返回所有受支持的方法,攻击者可以获得信息。感谢您的回复。它不起作用。你还有别的解决办法吗?