From: Clinton Ebadi Date: Fri, 4 Jan 2019 05:18:33 +0000 (-0500) Subject: apache: relax rewrite_arg syntax X-Git-Tag: release_20190105 X-Git-Url: https://git.hcoop.net/hcoop/domtool2.git/commitdiff_plain/0b86cc7b4c6d4268654e8c460d4cbe1b0cbc549e 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. --- 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