changeset 1089:719129c13666

Fix regression of Rev 37952c111f71. Rev 37952c111f71 led to wiping away every role given in a comma separated list after the first comma, which also broke the automatic tests.
author Tom Gottfried <tom@intevation.de>
date Thu, 13 Oct 2016 19:46:28 +0200
parents cf03bdd59767
children 4f52e8bc3572
files src/main/java/de/intevation/lada/util/auth/ShibbolethFilter.java
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/main/java/de/intevation/lada/util/auth/ShibbolethFilter.java	Thu Oct 13 18:35:28 2016 +0200
+++ b/src/main/java/de/intevation/lada/util/auth/ShibbolethFilter.java	Thu Oct 13 19:46:28 2016 +0200
@@ -136,8 +136,10 @@
             String[] groupStrings = roles.split(";");
             String item;
             for (int i = 0; i < groupStrings.length; i++) {
-                item = groupStrings[i].replaceAll(",.*", "").replace("cn=", "");
-                groups.add(item);
+                String[] items = groupStrings[i].trim().split(",");
+                for (int j = 0; j < items.length; j++) {
+                    groups.add(items[j].replace("cn=", "").trim());
+                }
             }
             return groups;
         }
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)