Honour escaped slashes in regular expressions.
[libradsec.git] / radsecproxy.c
index a92fcd1..b70ea45 100644 (file)
@@ -1,16 +1,7 @@
-/* Copyright (c) 2006-2009, Stig Venaas, UNINETT AS.
- * Copyright (c) 2010, UNINETT AS, NORDUnet A/S.
- * Copyright (c) 2010-2012, NORDUnet A/S. */
+/* Copyright (c) 2007-2009, UNINETT AS
+ * Copyright (c) 2010-2012, NORDUnet A/S */
 /* See LICENSE for licensing information. */
 
-/* Code contributions from:
- *
- * Arne Schwabe <schwabe at uni-paderborn.de>
- * Maja Wolniewicz <mgw@umk.pl>
- * Simon Leinen <simon.leinen@switch.ch>
- * Stefan Winter <stefan.winter@restena.lu>
- */
-
 /* For UDP there is one server instance consisting of udpserverrd and udpserverth
  *              rd is responsible for init and launching wr
  * For TLS there is a server instance that launches tlsserverrd for each TLS peer
@@ -2441,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';