summaryrefslogtreecommitdiff
path: root/radsecproxy.c
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordberg.se>2013-05-31 14:10:49 +0200
committerLinus Nordberg <linus@nordberg.se>2013-05-31 14:10:49 +0200
commit500c70ce169a9bc700ed4f05fa9c37e7df13a387 (patch)
tree45d456b4d64163a5b183ebebfd72c5fc8ea44f68 /radsecproxy.c
parent51f100ea69640adc70882ee5bc07229fb2d47249 (diff)
Honour escaped slashes in regular expressions.RADSECPROXY-51
Closes RADSECPROXY-51.
Diffstat (limited to 'radsecproxy.c')
-rw-r--r--radsecproxy.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/radsecproxy.c b/radsecproxy.c
index 72399a0..b70ea45 100644
--- a/radsecproxy.c
+++ b/radsecproxy.c
@@ -2432,7 +2432,9 @@ struct modattr *extractmodattr(char *nameval) {
if (s[strlen(s) - 1] == '/')
s[strlen(s) - 1] = '\0';
- t = strchr(s, '/');
+ for (t = strchr(s, '/'); t; t = strchr(t+1, '/'))
+ if (t == s || t[-1] != '\\')
+ break;
if (!t)
return NULL;
*t = '\0';