Reconvert shibboleth attribute only if it is neither null nor empty.

This commit is contained in:
Pascal-Nicolas Becker
2014-03-06 16:15:41 +01:00
parent 7e6b805e32
commit c6016c8304

View File

@@ -1102,7 +1102,7 @@ public class ShibAuthentication implements AuthenticationMethod
"reconvert.attributes",
false);
if (reconvertAttributes)
if (!StringUtils.isEmpty(value) && reconvertAttributes)
{
try {
value = new String(value.getBytes("ISO-8859-1"), "UTF-8");