Repository navigation
[FIX] Fix SonarCloud reliability findings in frontend CSS, TopNavBar and x2text #2393
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: main
Are you sure you want to change the base?
Changes from all commits
90ee5d9
fc5ff49
bcbf1a9
1cdca8d
b2d7b97
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 |
|---|---|---|
|
|
@@ -103,7 +103,6 @@ | |
| } | ||
|
|
||
| .secondary-list-wrapper .sidebar-item-icons { | ||
| margin-top: 1; | ||
| height: auto; | ||
| width: 25px; | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -89,7 +89,13 @@ def process() -> Any: | |
| if uploaded_file.filename == "": | ||
| return {"message": "No selected file"}, 400 | ||
|
|
||
| file_size_in_kb = int(request.headers["Content-Length"]) / 1024 | ||
| # Missing (chunked upload) or non-integer Content-Length returns 400, not a 500. | ||
| content_length = request.headers.get("Content-Length") | ||
|
ritwik-g marked this conversation as resolved.
|
||
| try: | ||
| file_size_in_kb = int(content_length) / 1024 | ||
| except (TypeError, ValueError): | ||
| logging.warning("Rejecting /process: invalid Content-Length %r", content_length) | ||
| return {"message": "Missing or invalid Content-Length header"}, 400 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Low] [Lens 10 — Observability] — The rejection is not logged A missing or invalid header used to raise and leave a stack trace in the service log. Now it returns a 400 with no log line, so an operator seeing 400s from Confidence: High. Verification: VERIFIED, read the handler; the module uses
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed in b2d7b97: logs a warning with the rejected header value before returning 400. |
||
|
|
||
| bearer_token = AuthenticationMiddleware.get_token_from_auth_header(request) | ||
| _, org_id = AuthenticationMiddleware.get_organization_from_bearer_token(bearer_token) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.