|
| 1 | +diff --git a/XYZHubConnector/external/oauthlib/common.py b/XYZHubConnector/external/oauthlib/common.py |
| 2 | +index 5aeb015..dc15ae2 100644 |
| 3 | +--- a/XYZHubConnector/external/oauthlib/common.py |
| 4 | ++++ b/XYZHubConnector/external/oauthlib/common.py |
| 5 | +@@ -206,7 +206,7 @@ def generate_nonce(): |
| 6 | + .. _`section 3.2.1`: https://tools.ietf.org/html/draft-ietf-oauth-v2-http-mac-01#section-3.2.1 |
| 7 | + .. _`section 3.3`: https://tools.ietf.org/html/rfc5849#section-3.3 |
| 8 | + """ |
| 9 | +- return unicode_type(unicode_type(randbits(64)) + generate_timestamp()) |
| 10 | ++ return unicode_type(unicode_type(randbits(64)) + generate_timestamp()) # nosec |
| 11 | + |
| 12 | + |
| 13 | + def generate_timestamp(): |
| 14 | +@@ -393,10 +393,10 @@ class Request(object): |
| 15 | + self.validator_log = {} |
| 16 | + |
| 17 | + self._params = { |
| 18 | +- "access_token": None, |
| 19 | ++ "access_token": None, # nosec |
| 20 | + "client": None, |
| 21 | + "client_id": None, |
| 22 | +- "client_secret": None, |
| 23 | ++ "client_secret": None, # nosec |
| 24 | + "code": None, |
| 25 | + "code_challenge": None, |
| 26 | + "code_challenge_method": None, |
| 27 | +@@ -404,15 +404,15 @@ class Request(object): |
| 28 | + "extra_credentials": None, |
| 29 | + "grant_type": None, |
| 30 | + "redirect_uri": None, |
| 31 | +- "refresh_token": None, |
| 32 | +- "request_token": None, |
| 33 | ++ "refresh_token": None, # nosec |
| 34 | ++ "request_token": None, # nosec |
| 35 | + "response_type": None, |
| 36 | + "scope": None, |
| 37 | + "scopes": None, |
| 38 | + "state": None, |
| 39 | +- "token": None, |
| 40 | ++ "token": None, # nosec |
| 41 | + "user": None, |
| 42 | +- "token_type_hint": None, |
| 43 | ++ "token_type_hint": None, # nosec |
| 44 | + |
| 45 | + # OpenID Connect |
| 46 | + "response_mode": None, |
| 47 | +@@ -422,7 +422,7 @@ class Request(object): |
| 48 | + "claims": None, |
| 49 | + "max_age": None, |
| 50 | + "ui_locales": None, |
| 51 | +- "id_token_hint": None, |
| 52 | ++ "id_token_hint": None, # nosec |
| 53 | + "login_hint": None, |
| 54 | + "acr_values": None |
| 55 | + } |
| 56 | +diff --git a/XYZHubConnector/external/oauthlib/oauth1/rfc5849/__init__.py b/XYZHubConnector/external/oauthlib/oauth1/rfc5849/__init__.py |
| 57 | +index 4f462bb..d4c2b7c 100644 |
| 58 | +--- a/XYZHubConnector/external/oauthlib/oauth1/rfc5849/__init__.py |
| 59 | ++++ b/XYZHubConnector/external/oauthlib/oauth1/rfc5849/__init__.py |
| 60 | +@@ -181,7 +181,7 @@ class Client(object): |
| 61 | + content_type = request.headers.get('Content-Type', None) |
| 62 | + content_type_eligible = content_type and content_type.find('application/x-www-form-urlencoded') < 0 |
| 63 | + if request.body is not None and content_type_eligible: |
| 64 | +- params.append(('oauth_body_hash', base64.b64encode(hashlib.sha1(request.body.encode('utf-8')).digest()).decode('utf-8'))) |
| 65 | ++ params.append(('oauth_body_hash', base64.b64encode(hashlib.sha1(request.body.encode('utf-8')).digest()).decode('utf-8'))) # nosec |
| 66 | + |
| 67 | + return params |
| 68 | + |
| 69 | +diff --git a/XYZHubConnector/external/oauthlib/oauth2/rfc6749/clients/base.py b/XYZHubConnector/external/oauthlib/oauth2/rfc6749/clients/base.py |
| 70 | +index 9b05ad5..249aac8 100644 |
| 71 | +--- a/XYZHubConnector/external/oauthlib/oauth2/rfc6749/clients/base.py |
| 72 | ++++ b/XYZHubConnector/external/oauthlib/oauth2/rfc6749/clients/base.py |
| 73 | +@@ -47,9 +47,9 @@ class Client(object): |
| 74 | + Python, this is usually :py:class:`oauthlib.oauth2.WebApplicationClient`. |
| 75 | + |
| 76 | + """ |
| 77 | +- refresh_token_key = 'refresh_token' |
| 78 | ++ refresh_token_key = 'refresh_token' # nosec |
| 79 | + |
| 80 | +- def __init__(self, client_id, |
| 81 | ++ def __init__(self, client_id, # nosec |
| 82 | + default_token_placement=AUTH_HEADER, |
| 83 | + token_type='Bearer', |
| 84 | + access_token=None, |
| 85 | +@@ -311,7 +311,7 @@ class Client(object): |
| 86 | + refresh_token=refresh_token, scope=self.scope, **kwargs) |
| 87 | + return token_url, FORM_ENC_HEADERS, body |
| 88 | + |
| 89 | +- def prepare_token_revocation_request(self, revocation_url, token, |
| 90 | ++ def prepare_token_revocation_request(self, revocation_url, token, # nosec |
| 91 | + token_type_hint="access_token", body='', callback=None, **kwargs): |
| 92 | + """Prepare a token revocation request. |
| 93 | + |
| 94 | +diff --git a/XYZHubConnector/external/oauthlib/oauth2/rfc6749/endpoints/metadata.py b/XYZHubConnector/external/oauthlib/oauth2/rfc6749/endpoints/metadata.py |
| 95 | +index 936e878..8c21892 100644 |
| 96 | +--- a/XYZHubConnector/external/oauthlib/oauth2/rfc6749/endpoints/metadata.py |
| 97 | ++++ b/XYZHubConnector/external/oauthlib/oauth2/rfc6749/endpoints/metadata.py |
| 98 | +@@ -43,9 +43,9 @@ class MetadataEndpoint(BaseEndpoint): |
| 99 | + """ |
| 100 | + |
| 101 | + def __init__(self, endpoints, claims={}, raise_errors=True): |
| 102 | +- assert isinstance(claims, dict) |
| 103 | ++ assert isinstance(claims, dict) # nosec |
| 104 | + for endpoint in endpoints: |
| 105 | +- assert isinstance(endpoint, BaseEndpoint) |
| 106 | ++ assert isinstance(endpoint, BaseEndpoint) # nosec |
| 107 | + |
| 108 | + BaseEndpoint.__init__(self) |
| 109 | + self.raise_errors = raise_errors |
| 110 | +diff --git a/XYZHubConnector/external/oauthlib/oauth2/rfc6749/endpoints/pre_configured.py b/XYZHubConnector/external/oauthlib/oauth2/rfc6749/endpoints/pre_configured.py |
| 111 | +index e2cc9db..99b643b 100644 |
| 112 | +--- a/XYZHubConnector/external/oauthlib/oauth2/rfc6749/endpoints/pre_configured.py |
| 113 | ++++ b/XYZHubConnector/external/oauthlib/oauth2/rfc6749/endpoints/pre_configured.py |
| 114 | +@@ -68,7 +68,7 @@ class Server(AuthorizationEndpoint, IntrospectEndpoint, TokenEndpoint, |
| 115 | + 'refresh_token': refresh_grant, |
| 116 | + }, |
| 117 | + default_token_type=bearer) |
| 118 | +- ResourceEndpoint.__init__(self, default_token='Bearer', |
| 119 | ++ ResourceEndpoint.__init__(self, default_token='Bearer', # nosec |
| 120 | + token_types={'Bearer': bearer}) |
| 121 | + RevocationEndpoint.__init__(self, request_validator) |
| 122 | + IntrospectEndpoint.__init__(self, request_validator) |
| 123 | +@@ -107,7 +107,7 @@ class WebApplicationServer(AuthorizationEndpoint, IntrospectEndpoint, TokenEndpo |
| 124 | + 'refresh_token': refresh_grant, |
| 125 | + }, |
| 126 | + default_token_type=bearer) |
| 127 | +- ResourceEndpoint.__init__(self, default_token='Bearer', |
| 128 | ++ ResourceEndpoint.__init__(self, default_token='Bearer', # nosec |
| 129 | + token_types={'Bearer': bearer}) |
| 130 | + RevocationEndpoint.__init__(self, request_validator) |
| 131 | + IntrospectEndpoint.__init__(self, request_validator) |
| 132 | +@@ -140,7 +140,7 @@ class MobileApplicationServer(AuthorizationEndpoint, IntrospectEndpoint, |
| 133 | + response_types={ |
| 134 | + 'token': implicit_grant}, |
| 135 | + default_token_type=bearer) |
| 136 | +- ResourceEndpoint.__init__(self, default_token='Bearer', |
| 137 | ++ ResourceEndpoint.__init__(self, default_token='Bearer', # nosec |
| 138 | + token_types={'Bearer': bearer}) |
| 139 | + RevocationEndpoint.__init__(self, request_validator, |
| 140 | + supported_token_types=['access_token']) |
| 141 | +@@ -179,7 +179,7 @@ class LegacyApplicationServer(TokenEndpoint, IntrospectEndpoint, |
| 142 | + 'refresh_token': refresh_grant, |
| 143 | + }, |
| 144 | + default_token_type=bearer) |
| 145 | +- ResourceEndpoint.__init__(self, default_token='Bearer', |
| 146 | ++ ResourceEndpoint.__init__(self, default_token='Bearer', # nosec |
| 147 | + token_types={'Bearer': bearer}) |
| 148 | + RevocationEndpoint.__init__(self, request_validator) |
| 149 | + IntrospectEndpoint.__init__(self, request_validator) |
| 150 | +@@ -212,7 +212,7 @@ class BackendApplicationServer(TokenEndpoint, IntrospectEndpoint, |
| 151 | + grant_types={ |
| 152 | + 'client_credentials': credentials_grant}, |
| 153 | + default_token_type=bearer) |
| 154 | +- ResourceEndpoint.__init__(self, default_token='Bearer', |
| 155 | ++ ResourceEndpoint.__init__(self, default_token='Bearer', # nosec |
| 156 | + token_types={'Bearer': bearer}) |
| 157 | + RevocationEndpoint.__init__(self, request_validator, |
| 158 | + supported_token_types=['access_token']) |
| 159 | +diff --git a/XYZHubConnector/external/oauthlib/oauth2/rfc6749/parameters.py b/XYZHubConnector/external/oauthlib/oauth2/rfc6749/parameters.py |
| 160 | +index 14d4c0d..e2fcfaf 100644 |
| 161 | +--- a/XYZHubConnector/external/oauthlib/oauth2/rfc6749/parameters.py |
| 162 | ++++ b/XYZHubConnector/external/oauthlib/oauth2/rfc6749/parameters.py |
| 163 | +@@ -162,7 +162,7 @@ def prepare_token_request(grant_type, body='', include_client_id=True, **kwargs) |
| 164 | + return add_params_to_qs(body, params) |
| 165 | + |
| 166 | + |
| 167 | +-def prepare_token_revocation_request(url, token, token_type_hint="access_token", |
| 168 | ++def prepare_token_revocation_request(url, token, token_type_hint="access_token", # nosec |
| 169 | + callback=None, body='', **kwargs): |
| 170 | + """Prepare a token revocation request. |
| 171 | + |
| 172 | +diff --git a/XYZHubConnector/external/oauthlib/oauth2/rfc6749/tokens.py b/XYZHubConnector/external/oauthlib/oauth2/rfc6749/tokens.py |
| 173 | +index 3587af4..769f6ae 100644 |
| 174 | +--- a/XYZHubConnector/external/oauthlib/oauth2/rfc6749/tokens.py |
| 175 | ++++ b/XYZHubConnector/external/oauthlib/oauth2/rfc6749/tokens.py |
| 176 | +@@ -320,7 +320,7 @@ class BearerToken(TokenBase): |
| 177 | + token = { |
| 178 | + 'access_token': self.token_generator(request), |
| 179 | + 'expires_in': expires_in, |
| 180 | +- 'token_type': 'Bearer', |
| 181 | ++ 'token_type': 'Bearer', # nosec |
| 182 | + } |
| 183 | + |
| 184 | + # If provided, include - this is optional in some cases https://tools.ietf.org/html/rfc6749#section-3.3 but |
| 185 | +diff --git a/XYZHubConnector/external/oauthlib/openid/connect/core/endpoints/pre_configured.py b/XYZHubConnector/external/oauthlib/openid/connect/core/endpoints/pre_configured.py |
| 186 | +index fde2739..b9f3769 100644 |
| 187 | +--- a/XYZHubConnector/external/oauthlib/openid/connect/core/endpoints/pre_configured.py |
| 188 | ++++ b/XYZHubConnector/external/oauthlib/openid/connect/core/endpoints/pre_configured.py |
| 189 | +@@ -102,7 +102,7 @@ class Server(AuthorizationEndpoint, IntrospectEndpoint, TokenEndpoint, |
| 190 | + 'refresh_token': refresh_grant, |
| 191 | + }, |
| 192 | + default_token_type=bearer) |
| 193 | +- ResourceEndpoint.__init__(self, default_token='Bearer', |
| 194 | ++ ResourceEndpoint.__init__(self, default_token='Bearer', # nosec |
| 195 | + token_types={'Bearer': bearer, 'JWT': jwt}) |
| 196 | + RevocationEndpoint.__init__(self, request_validator) |
| 197 | + IntrospectEndpoint.__init__(self, request_validator) |
0 commit comments