-
Notifications
You must be signed in to change notification settings - Fork 975
M1 #574
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
Merged
M1 #574
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
5b4cfec
m1 init
ashwin31 2535445
m2
ashwin31 b3647f8
m3
ashwin31 6327e84
m4
ashwin31 e5c6eac
m5
ashwin31 27f08d1
m6
ashwin31 8f1719c
m7
ashwin31 99a1542
m8
ashwin31 7b8225a
m9
ashwin31 6de8350
m10
ashwin31 9400ce6
comments added
ashwin31 1612a05
m11
ashwin31 62fb884
m11
ashwin31 4489805
m12
ashwin31 60917e8
.
ashwin31 26fe2eb
m13
ashwin31 3d7b269
ui enhanced
ashwin31 12e6398
m14
ashwin31 158c9bc
m15
ashwin31 666c59a
m16
ashwin31 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Check warning
Code scanning / CodeQL
Information exposure through an exception Medium
Copilot Autofix
AI 27 days ago
In general, to fix this issue you should avoid returning raw exception messages to the client. Instead, log the detailed error message (and optionally the stack trace) on the server, and send a generic, non-sensitive error message in the HTTP response. This preserves debuggability without exposing internal details or third‑party library messages.
For this specific code, the best minimal fix is:
try/except ValueError as e:block as is structurally.except, add server-side logging of the exception (using Python’s standardloggingmodule, which is already widely used and does not change existing functionality).{"error": f"Invalid token: {str(e)}"}with a generic message such as{"error": "Invalid token"}so the client no longer sees the raw exception text.Concretely, in
backend/common/views/auth_views.py:import loggingat the top alongside the other imports.except ValueError as e:block inGoogleIdTokenView.post, log the exception usinglogging.exception(orlogging.getLogger(__name__).exception) with a clear message, then return a generic error payload.No behavior other than the specific error message content is changed: the status code remains 400, and the control flow stays identical.