summaryrefslogtreecommitdiff
path: root/server/util_regex.c
diff options
context:
space:
mode:
authorEric Covener <covener@apache.org>2020-02-19 12:26:31 +0000
committerEric Covener <covener@apache.org>2020-02-19 12:26:31 +0000
commit40bf351edc852c86e9a6bb85ef6d7f5b6a2bee3a (patch)
tree8b4b194c4a74cf01e2161f502006d4af59216e1d /server/util_regex.c
parent10ef9923a94c95a550546e1df3748fd5f3ecb81c (diff)
downloadhttpd-40bf351edc852c86e9a6bb85ef6d7f5b6a2bee3a.tar.gz
add AP_REG_NO_DEFAULT to allow opt-out of pcre defaults
... and use it in mod_substitute to avoid DOTALL git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1874191 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server/util_regex.c')
-rw-r--r--server/util_regex.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/util_regex.c b/server/util_regex.c
index 2a30d68176..5405f8d4d0 100644
--- a/server/util_regex.c
+++ b/server/util_regex.c
@@ -94,6 +94,7 @@ AP_DECLARE(ap_rxplus_t*) ap_rxplus_compile(apr_pool_t *pool,
}
/* anything after the current delimiter is flags */
+ ret->flags = ap_regcomp_get_default_cflags() & AP_REG_DOLLAR_ENDONLY;
while (*++endp) {
switch (*endp) {
case 'i': ret->flags |= AP_REG_ICASE; break;
@@ -106,7 +107,7 @@ AP_DECLARE(ap_rxplus_t*) ap_rxplus_compile(apr_pool_t *pool,
default: break; /* we should probably be stricter here */
}
}
- if (ap_regcomp(&ret->rx, rxstr, ret->flags) == 0) {
+ if (ap_regcomp(&ret->rx, rxstr, AP_REG_NO_DEFAULT | ret->flags) == 0) {
apr_pool_cleanup_register(pool, &ret->rx, rxplus_cleanup,
apr_pool_cleanup_null);
}