[codex] Keep auth preflight rule internal#341
Draft
ifer47 wants to merge 1 commit into
Draft
Conversation
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.
What changed
Fixes #214.
The Chrome settings proxy backend used to insert the internal proxy-auth preflight rule directly into the active SwitchProfile before generating the PAC script, then remove it in
finally. That made the internalpreflight-auth.non-existent-website.zzzzzzzzeroomega.zerorule observable by other code while the profile was being applied.This changes the preflight path to clone the profile first, add the probe rule only to that clone, and generate the PAC script from the clone. The user's profile object is never mutated by the internal auth probe.
Why
The preflight rule is an implementation detail for triggering proxy authentication. It should not be visible to the options UI, sync/storage code, temp-rule state, or any rule-adding flow. Keeping it out of the real profile prevents it from leaking into Auto Switch rules.
Validation
coffeelint.cmd src/module/proxy/proxy_impl_settings.coffee test/proxy_impl_settings.coffeefromomega-target-chromium-extensionomega-target-chromium-extension/test/proxy_impl_settings.coffee: 1 passing