test(auth): pin both halves of the loopback scheme guard #5
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "test-loopback-scheme-guard"
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?
loopback_matches_ignoring_portalready requires both the allowlist entry and the requested URI to usehttp, but no test held either half in place. This addsloopback_entry_does_not_match_a_different_requested_scheme. No behaviour change.Both halves were verified load-bearing by mutation:
if entry.scheme() != "http" {(drop the requested-URI check)https://localhost:3118/callbackmatched anhttp://localhost:8787/callbackentryif uri.scheme() != "http" {(drop the entry check)https://localhost:8443/callbackentry admitted a cleartexthttp://localhost:3118/callbackBefore this test, the first mutation left the whole suite green. That is the hole a naive version of #2's fix has, and none of the four tests the issue specified would have caught it.
cargo fmt --all --checkclean,cargo clippy --all-targets --all-features --locked -- -D warningsclean,cargo test --all-features --locked100 passed / 0 failed.Follow-up to #2; no release needed, v0.1.2 already carries the correct matcher.