From e1e64bd9fed2ecbec4ba8d28f6d6efd1f6326975 Mon Sep 17 00:00:00 2001 From: "Kyle J. McKay" Date: Mon, 13 Jul 2020 09:53:24 -0700 Subject: [PATCH] apache.conf.in: provide extra blob_plain checking Signed-off-by: Kyle J. McKay --- apache.conf.in | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/apache.conf.in b/apache.conf.in index 00e4c0a..3c0fd48 100644 --- a/apache.conf.in +++ b/apache.conf.in @@ -131,8 +131,8 @@ RewriteEngine On - # Snapshot requests are only allowed via the PATH_INFO mechanism - RewriteCond %{QUERY_STRING} (^|[&;])a=snapshot([&;]|$) [NC] + # Snapshot/blob_plain requests are only allowed via the PATH_INFO mechanism + RewriteCond %{QUERY_STRING} (^|[&;])a=(?:snapshot|blob_plain)([&;]|$) [NC] RewriteRule .? - [NS,F,L] # Redirect snapshot requests to snapshot.cgi @@ -142,6 +142,36 @@ snapshot(?:/.*)?)$" \ @@cgiroot@@/snapshot.cgi/$1 [NS,L,H=cgi-script] + # Detect blob_plain requests with is_blob_plain + RewriteRule \ + "(?x)^/(?![bchr]/)(?:w/)? \ + ((?:[a-zA-Z0-9][a-zA-Z0-9+._-]*(?