HCoop
/
hcoop
/
domtool2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Using PCRE to check regexps passed to Apache
[hcoop/domtool2.git]
/
src
/
plugins
/
apache.sml
diff --git
a/src/plugins/apache.sml
b/src/plugins/apache.sml
index
617420a
..
fda708e
100644
(file)
--- a/
src/plugins/apache.sml
+++ b/
src/plugins/apache.sml
@@
-86,6
+86,10
@@
val _ = Env.type_one "suexec_flag"
Env.bool
(fn b => b orelse Domain.hasPriv "www")
+val _ = Env.type_one "regexp"
+ Env.string
+ Pcre.validRegexp
+
fun validLocation s =
size s > 0 andalso size s < 1000 andalso CharVector.all
(fn ch => Char.isAlphaNum ch