Skip to content

fix(web): stop dumping the config and request headers to the journal - #479

Closed
ChuckBuilds wants to merge 1 commit into
mainfrom
fix/debug-dump-of-config-and-headers
Closed

fix(web): stop dumping the config and request headers to the journal#479
ChuckBuilds wants to merge 1 commit into
mainfrom
fix/debug-dump-of-config-and-headers

Conversation

@ChuckBuilds

Copy link
Copy Markdown
Owner

save_main_config logged its whole POST body and full request headers at ERROR, on every save:

logging.error(f"DEBUG: save_main_config received data: {data}")
logging.error(f"DEBUG: Content-Type header: {request.content_type}")
logging.error(f"DEBUG: Headers: {dict(request.headers)}")

The body is the configuration itself; the headers carry the session cookie. A routine settings change wrote both to the journal, at a level that survives any sane log filter.

They are leftover debug output — they say DEBUG: in the message while calling logging.error, and they use the root logger rather than the module logger, so the level configured for this blueprint never applied.

Replaced with a logger.debug line recording the request's shape, which is the part with diagnostic value. The local import logging went too: it shadowed a module-level import already present at line 13.

260 web tests pass.

Found while investigating #478, which fixes the credential erasure in the same function.

save_main_config logged its entire POST body and the full request headers at
ERROR on every save. The body is the configuration itself, and the headers
carry the session cookie, so a routine settings change wrote both to the
journal -- at a level that guarantees they survive any sane log filter.

The lines are leftover debug output: they say "DEBUG:" in the message while
calling logging.error, and they went through the root logger rather than the
module logger, bypassing the level configured for this blueprint.

Replaced with a debug-level line recording the shape of the request, which is
the part with diagnostic value. The local `import logging` went with them; it
shadowed a module-level import that was already there.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01STMbQE4YctTacQXfbYqKuW
@coderabbitai

coderabbitai Bot commented Aug 20, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@ChuckBuilds, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 13 minutes

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

Wait for the limit to reset, then comment @coderabbitai review or push new commits to the PR.

An organization admin can change what happens after included review limits in Billing.

How do review limits work?

CodeRabbit enforces per-developer PR review limits within each organization.

For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 4a3aa579-0c94-43a7-8e64-d23c9e443595

📥 Commits

Reviewing files that changed from the base of the PR and between cf0a551 and f0efdaf.

📒 Files selected for processing (1)
  • web_interface/blueprints/api_v3.py

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@ChuckBuilds

Copy link
Copy Markdown
Owner Author

Superseded by #485, which combines the seven api_v3.py PRs so they do not conflict with each other. Every change from this PR is verified present on that branch; the branch here is untouched if you want to compare.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant