-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove circular-fragment, add post-based csrf
- Loading branch information
Showing
8 changed files
with
47 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
"""Checks if queries are allowed over POST not in JSON.""" | ||
from lib.utils import request, curlify | ||
|
||
|
||
def post_based_csrf(url, proxies, headers): | ||
res = { | ||
'result':False, | ||
'title':'POST based url-encoded query (possible CSRF)', | ||
'description':'GraphQL accepts non-JSON queries over POST', | ||
'impact':'Possible Cross Site Request Forgery', | ||
'severity':'MEDIUM', | ||
'curl_verify':'' | ||
} | ||
|
||
q = 'query {__typename}' | ||
|
||
response = request(url, proxies=proxies, headers=headers, params={'query':q}, verb='POST') | ||
res['curl_verify'] = curlify(response) | ||
|
||
try: | ||
if response and response.json()['data']['__typename']: | ||
res['result'] = True | ||
except: | ||
pass | ||
|
||
return res |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
"""Version details of graphql-cop.""" | ||
VERSION = '1.5' | ||
VERSION = '1.6' |