Repository navigation
fix: prevent secrets in Loguru tracebacks - #25769
Closed
RealBhupesh wants to merge 1 commit into
Closed
RealBhupesh wants to merge 1 commit into
RealBhupesh wants to merge 1 commit into
Conversation
|
Notice regarding Contributor License Agreement acceptance The Contributor License Agreement (CLA) checkbox in the pull request description remains unchecked ( Explicit acceptance of the CLA is required for the acceptance of any contribution. By leaving the checkbox unmarked, the agreement to the terms has not been legally confirmed. This pull request has been closed. To resolve this matter, please edit the pull request description to explicitly check the CLA checkbox ( |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Pull Request Checklist
devbranch.dev.fixprefix.Description
Loguru text sinks default to
diagnose=True, which renders values from exception frames. Request objects can contain sensitive headers such as API keys, causing secrets to appear in stack traces regardless of the configured log level.This change disables diagnostic variable rendering for the human-readable stdout sink while retaining traceback function and exception context. It also adds a regression test using a simulated API key.
Validation
python3 -m pytest -q test/test_logger.pypython3 -m py_compile backend/open_webui/utils/logger.py test/test_logger.pypython3 -m ruff format --check backend/open_webui/utils/logger.py test/test_logger.pyE501andE731findings.Changelog Entry
Security
Fixed
Additional Information
Fixes #25767
Screenshots or Videos
Contributor License Agreement