Repository navigation
fix(telemetry): drop saved headers when the endpoint moves, even with the mask - #199
Merged
Merged
Conversation
… the mask Moving the telemetry endpoint to another host drops the saved headers, so a collector's token never reaches the new host. A request that also echoed the headers' "unchanged" mask skipped that, and the token went along. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W42z4FbekWr33b6791svQQ
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.
Requested by Adeel · project thread
Description
Before: changing
telemetry.endpointto another host drops the saved headers, which usually hold the collector's auth token. That step was skipped whenever the request includedheadersat all, even when the value was{"secret": true}, the mask that means "unchanged". SoPUT /settings/telemetry {"endpoint": "https://new-host", "headers": {"secret": true}}sent the old collector's token to the new host.After: only a new headers value keeps headers across a host move. The mask counts as unchanged, so they are dropped. Moving to another path on the same host still keeps them.
Motivation and Context
This answers threat-model question Q35: the header drop is promised and joins P-ADMIN-GUARD. The web app sends only changed fields, so this was reachable through the API, by an admin.
Steps to reproduce (if appropriate):
The updated step in
test_telemetry.pyfails on main and passes here.Types of changes
!in the title)Checklist:
make hookschecks it on commit).docs/accordingly.## UnreleasedinCHANGELOG.md.🤖 Generated with Claude Code
https://claude.ai/code/session_01W42z4FbekWr33b6791svQQ
Generated by Claude Code