mirror of
https://github.com/j93es/oauth-backend.git
synced 2026-06-04 06:41:52 +09:00
[Update] save vuln report logic
This commit is contained in:
parent
062552d3d8
commit
3a1422a2f2
9 changed files with 121 additions and 190 deletions
10
lib/utils/is_oauth_uri.py
Normal file
10
lib/utils/is_oauth_uri.py
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
from urllib.parse import urlparse, parse_qs
|
||||
|
||||
def is_oauth_uri(uri: str) -> bool:
|
||||
qs = parse_qs(urlparse(uri).query)
|
||||
qs_keys = [*qs]
|
||||
|
||||
if "client_id" in qs_keys and any(p in qs_keys for p in (
|
||||
"redirect_uri", "response_type", "grant_type", "scope", "state", "nonce")):
|
||||
return True
|
||||
return False
|
||||
Loading…
Add table
Add a link
Reference in a new issue