fix: blocklist fails open when a regex fails to compile #87

Merged
benvin merged 1 commits from benvin/validate-remote-patterns into master 2026-07-02 20:19:29 +10:00

1 Commits

Author SHA1 Message Date
unkinben 65c8281348 fix: validate remote regex patterns at write time
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
compilePatterns silently drops any pattern that fails to compile, so a
mistyped blocklist entry became a no-op (fail-open). Reject invalid
patterns when a remote is created or updated via Remote.ValidatePatterns,
returning 400 instead of storing a rule that never matches.

Refs #72
2026-07-02 00:32:16 +10:00