mirror of
https://github.com/j93es/oauth-backend.git
synced 2026-06-04 01:21:51 +09:00
Merge pull request #27 from j93es/gyu
This commit is contained in:
commit
3018b4fd23
3 changed files with 1726 additions and 1406 deletions
|
|
@ -4,7 +4,7 @@ from pkce_check import PKCEDowngradeChecker
|
|||
from addon.scope_detection import ScopeDetection
|
||||
from csrf_check import CsrfChecker
|
||||
from client_secret import ClientSecret
|
||||
from redirect_uri_check import RedirectBypassChecker
|
||||
from addon.open_redirect_check import OpenRedirectChecker
|
||||
from access_token import AccessTokenScanner
|
||||
from addon.google_login_hint import GoogleLoginHint
|
||||
from addon.google_response_type_token import GoogleResponseTypeToken
|
||||
|
|
@ -18,6 +18,8 @@ false_true_varifing_task = FalseTrueVarifingTask()
|
|||
|
||||
load_dotenv(override=True)
|
||||
|
||||
_open_redirect_checker = OpenRedirectChecker()
|
||||
|
||||
class AddonBase:
|
||||
"""
|
||||
Base class for addons.
|
||||
|
|
@ -62,8 +64,6 @@ class AddonBase:
|
|||
|
||||
return False
|
||||
|
||||
|
||||
|
||||
async def request(self, flow: http.HTTPFlow):
|
||||
if self.google_login_hint:
|
||||
await try_catch(self.google_login_hint.request(flow))
|
||||
|
|
@ -85,8 +85,8 @@ class AddonBase:
|
|||
try_catch(ScopeDetection().test(flow)),
|
||||
try_catch(ClientSecret().test(flow)),
|
||||
try_catch(AccessTokenScanner().scan(flow)),
|
||||
try_catch(RedirectBypassChecker().test(flow)),
|
||||
try_catch(GoogleResponseTypeToken().test(flow)),
|
||||
try_catch(_open_redirect_checker.test(flow)),
|
||||
]
|
||||
await asyncio.gather(*tasks)
|
||||
|
||||
|
|
|
|||
1722
addon/open_redirect_check.py
Normal file
1722
addon/open_redirect_check.py
Normal file
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue