Compare commits

..

3 Commits

Author SHA1 Message Date
Anna Sirota
00e7914da0 Pin a different version of wheel 2021-03-18 17:15:02 +01:00
Anna Sirota
fb151734ef Pin setuptools and wheels as well 2021-03-18 16:57:44 +01:00
Anna Sirota
1ec08638ce Pin cryprography 2021-03-18 11:46:05 +01:00
2 changed files with 4 additions and 6 deletions

View File

@ -663,7 +663,7 @@ class PillarServer(BlinkerCompatibleEve):
return self.pillar_error_handler(error) return self.pillar_error_handler(error)
def handle_sdk_resource_invalid(self, error): def handle_sdk_resource_invalid(self, error):
self.log.exception('Forwarding ResourceInvalid exception to client: %s', error, exc_info=True) self.log.info('Forwarding ResourceInvalid exception to client: %s', error, exc_info=True)
# Raising a Werkzeug 422 exception doens't work, as Flask turns it into a 500. # Raising a Werkzeug 422 exception doens't work, as Flask turns it into a 500.
return _('The submitted data could not be validated.'), 422 return _('The submitted data could not be validated.'), 422

View File

@ -169,6 +169,8 @@ def validate_this_token(token, oauth_subclient=None):
# Check the users to see if there is one with this Blender ID token. # Check the users to see if there is one with this Blender ID token.
db_token = find_token(token, oauth_subclient) db_token = find_token(token, oauth_subclient)
if not db_token: if not db_token:
log.debug('Token %r not found in our local database.', token)
# If no valid token is found in our local database, we issue a new # If no valid token is found in our local database, we issue a new
# request to the Blender ID server to verify the validity of the token # request to the Blender ID server to verify the validity of the token
# passed via the HTTP header. We will get basic user info if the user # passed via the HTTP header. We will get basic user info if the user
@ -375,10 +377,6 @@ def current_user():
def setup_app(app): def setup_app(app):
@app.before_request @app.before_request
def validate_token_at_each_request(): def validate_token_at_each_request():
# Skip token validation if this is a static asset
# to avoid spamming Blender ID for no good reason
if request.path.startswith('/static/'):
return
validate_token() validate_token()