mirror of
https://github.com/Glitchy-Sheep/boosty-downloader.git
synced 2026-10-14 21:33:23 +00:00
[PR #139] [MERGED] [debug-log] Keep query keys in logged URLs, mask only the values #142
Labels
No labels
api-drift
bug
ci
documentation
enhancement
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Glitchy-Sheep/boosty-downloader#142
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Glitchy-Sheep/boosty-downloader/pull/139
Author: @Glitchy-Sheep
Created: 8/13/2026
Status: ✅ Merged
Merged: 8/13/2026
Merged by: @Glitchy-Sheep
Base:
main← Head:feat/redact-keep-query-keys📝 Commits (1)
1cef854feat: Keep query keys in debug log URLs, mask only their values📊 Changes
3 files changed (+17 additions, -8 deletions)
View changed files
📝
CHANGELOG.md(+4 -0)📝
boosty_downloader/src/infrastructure/loggers/request_tracing.py(+10 -5)📝
test/unit/loggers/request_tracing_test.py(+3 -3)📄 Description
Summary
The debug log used to cut the whole query string off every logged URL. Now it keeps the keys and masks only the values:
?sig=...&expire=...instead of nothing. The log stays safe to attach to public issues, but a failing request can finally be matched to a concrete endpoint call shape.Problem
redacted_urldropped everything after the path, so two different requests to the same path looked identical in the log?offset=...&limit=...) the query keys are the only thing that tells one page request from anotherFix
redacted_urlnow parses the query and rewrites every pair askey=..., preserving key order and duplicatesBefore / After
Before:
GET https://api.boosty.to/v1/blog/boosty/post/After:
GET https://api.boosty.to/v1/blog/boosty/post/?offset=...&limit=...Verification
--debug check --username boosty- the log shows?limit=...and?offset=...&limit=...lines, no values anywheresigandexpirekeys but not theSECRETvalue; the plain-URL test still passestask checkgreen (ruff, format, pyright), all 73 unit tests pass🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.