diff options
author | Linus Nordberg <linus@nordberg.se> | 2013-05-31 14:10:49 +0200 |
---|---|---|
committer | Linus Nordberg <linus@nordberg.se> | 2013-09-02 13:44:21 +0200 |
commit | 05b360612d4f1bb48caedc766ede2109024bdc6f (patch) | |
tree | af3ed0e9665d8dbc433b9a1a1de32d38d3399844 | |
parent | 5fd15c1291bbc104edc83a7056b943390a3c823b (diff) |
Honour escaped slashes in regular expressions.
Closes RADSECPROXY-51.
-rw-r--r-- | radsecproxy.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/radsecproxy.c b/radsecproxy.c index 8489a18..e919ceb 100644 --- a/radsecproxy.c +++ b/radsecproxy.c @@ -2445,7 +2445,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'; |