-
Notifications
You must be signed in to change notification settings - Fork 818
Fix possible crash in validator when 'client' key is mentioned in request body #1252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
7e628c4
71d2605
f450855
da0f147
611cd52
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -202,19 +202,32 @@ def _load_application(self, client_id, request): | |||||
| If request.client was not set, load application instance for given | ||||||
| client_id and store it in request.client | ||||||
| """ | ||||||
|
|
||||||
| # we want to be sure that request has the client attribute! | ||||||
| assert hasattr(request, "client"), '"request" instance has no "client" attribute' | ||||||
|
|
||||||
| if request.client: | ||||||
| """ check for cached client, to save the db hit if this has alredy been loaded """ | ||||||
|
||||||
| if not isinstance(request.client, Application): | ||||||
| log.debug("request.client is not an Application, something else set request.client erroroneously, resetting request.client.") | ||||||
|
||||||
| log.debug("request.client is not an Application, something else set request.client erroroneously, resetting request.client.") | |
| log.debug("request.client is not an Application, something else set request.client erroneously, resetting request.client.") |
Copilot
AI
Nov 5, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use double quotes for docstrings instead of triple-quoted strings for inline comments. Change to a regular comment using # or convert to a proper multi-line docstring.
| """ cache wasn't hit, load from db """ | |
| # cache wasn't hit, load from db |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Corrected spelling of 'alredy' to 'already'.