reordered checks

This commit is contained in:
Somdev Sangwan
2019-11-24 21:57:45 +05:30
committed by GitHub
parent cecfe22500
commit 392e82496d

View File

@@ -5,15 +5,16 @@ from core.requester import requester
def passive_tests(url, acao_header): def passive_tests(url, acao_header):
root = host(url) root = host(url)
if acao_header == '*':
return 'Wildcard value'
if root: if root:
if root != host(acao_header): if root != host(acao_header):
print(acao_header)
return 'Third party allowed' return 'Third party allowed'
elif url.startswith('http://'): elif url.startswith('http://'):
return 'HTTP origin allowed' return 'HTTP origin allowed'
else: else:
return False return False
elif acao_header == '*':
return 'Wildcard value'
else: else:
return 'Invalid value' return 'Invalid value'