From 5d92f09978a2e7b5f40becb5215a28f2407f4bb4 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 22 Nov 2026 11:41:01 +0000 Subject: host: path rules match whole path segments A path rule was a plain string prefix of the request's path, so https://api.github.com/search/issues, meant for that API endpoint (with whatever query), also allowed /search/issuesomethingelse, and the only way around it, /search/issues/, didn't allow the endpoint itself. Now a rule's path allows itself and the paths below it, /search/issues/..., but not /search/issuesx; one ending in "/" still allows whatever starts with it. The query was never part of the match, and still isn't. The requests' checks and POST /check share the code now. --- README.md | 1 + 1 file changed, 1 insertion(+) (limited to 'README.md') diff --git a/README.md b/README.md index 709aeb6..9746906 100644 --- a/README.md +++ b/README.md @@ -220,6 +220,7 @@ Each user has any number of named whitelists, in fc-egress list fc-egress allow https://cache.nixos.org # the domain and its subdomains fc-egress allow https://github.com/NixOS/ # only paths starting with /NixOS/ +fc-egress allow https://api.github.com/search/issues # that path and below, any query fc-egress allow tcp://192.0.2.7:22 # plain TCP to that address and port fc-egress allow tcp://git.example.org:22 # or name (resolved by the host) fc-egress allow udp://192.0.2.0/24:5000-5100 -- cgit v1.3.1