From 0b86cc7b4c6d4268654e8c460d4cbe1b0cbc549e Mon Sep 17 00:00:00 2001 From: Clinton Ebadi Date: Fri, 4 Jan 2019 00:18:33 -0500 Subject: [PATCH] apache: relax rewrite_arg syntax This was too restrictive, making ENV flag essentially useless (there is no way to access rewrite capture groups or other environment variables). This still forbids spaces; we could allow them, but would have to ensure proper quoting or escaping and the apache parser for rewrite arguments is pretty funky, so this seems to be of dubious value (read: it would be a lot more work). See https://bugzilla.hcoop.net/show_bug.cgi?id=1287 for background. --- src/plugins/apache.sml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/apache.sml b/src/plugins/apache.sml index 0c3e685..9d180ab 100644 --- a/src/plugins/apache.sml +++ b/src/plugins/apache.sml @@ -97,7 +97,7 @@ val _ = Env.type_one "proxy_reverse_target" val _ = Env.type_one "rewrite_arg" Env.string - (CharVector.all Char.isAlphaNum) + (CharVector.all (fn ch => (Char.isGraph ch) andalso not (List.exists (fn c => ch = c) [ #"[", #"]", #",", #"\"", #"'", #"=", #":" ]))) val _ = Env.type_one "suexec_flag" Env.bool -- 2.20.1