Skip to content

Commit 395b6c7

Browse files
atomic111chris-rock
authored andcommitted
added ref and added attribute for http method test
Signed-off-by: Patrick Münch <patrick.muench1111@gmail.com>
1 parent 6725b98 commit 395b6c7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

controls/nginx_spec.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,9 +274,10 @@
274274
impact 1.0
275275
title 'Disable insecure HTTP-methods'
276276
desc 'Disable insecure HTTP-methods and allow only necessary methods.'
277+
ref 'OWASP HTTP Methods', url: 'https://www.owasp.org/index.php/Test_HTTP_Methods_(OTG-CONFIG-006)'
277278

278279
describe file(nginx_conf) do
279-
its('content') { should match(/^\s+if ($request_method !~ ^(GET|HEAD|POST)$ )$/) }
280+
its('content') { should match(/^\s*if\s+\(\$request_method\s+\!\~\s+\^\(#{HTTP_METHODS}\)\$\)\{?$/) }
280281
end
281282
end
282283

0 commit comments

Comments
 (0)