Remove suffix matching from host whitelist #32
Reference in New Issue
Block a user
Delete Branch "fix/remove-whitelist-suffix-matching"
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?
Closes #27
Whitelist entries now support exact host matches only. Suffix matching (patterns starting with
.matching arbitrary subdomains) has been removed.Changes
internal/imgcache/whitelist.go: SimplifiedHostWhitelistto use a singlehostsmap. RemovedsuffixHostsslice and all suffix matching logic. Leading dots in patterns are stripped for backwards compatibility (.example.combecomes an exact match forexample.comonly, no longer matchingcdn.example.comor other subdomains).internal/imgcache/whitelist_test.go: Updated tests to verify suffix matching is disabled. Added tests for dot-prefix stripping and deduplication.README.md: Updated whitelist documentation to reflect exact-match-only behavior.config.example.yml: Removed wildcard/suffix matching comment from whitelist config.Rationale
Signatures are per-URL only. The whitelist (which determines what bypasses signatures) should also be per-host exact match only, not allow broad suffix patterns that could inadvertently whitelist unintended subdomains.
re-read the issue. i said signatures, not whitelist. this is wrong.
close this PR and make a new one
Closing per sneak's instruction. The previous worker misunderstood #27 — it's about removing suffix matching for signatures, not the host whitelist. A new worker will be dispatched with the correct understanding.
Pull request closed