From: Mathieu Baudier Date: Thu, 12 Feb 2015 15:03:17 +0000 (+0000) Subject: Improve error handling X-Git-Tag: argeo-commons-2.1.30~390 X-Git-Url: http://git.argeo.org/?a=commitdiff_plain;h=f26488eb522b692e8806a4066a8f8870d8399206;p=lgpl%2Fargeo-commons.git Improve error handling git-svn-id: https://svn.argeo.org/commons/trunk@7818 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc --- diff --git a/org.argeo.security.core/src/org/argeo/security/jcr/jackrabbit/JackrabbitUserAdminService.java b/org.argeo.security.core/src/org/argeo/security/jcr/jackrabbit/JackrabbitUserAdminService.java index fde3d850f..711c9d598 100644 --- a/org.argeo.security.core/src/org/argeo/security/jcr/jackrabbit/JackrabbitUserAdminService.java +++ b/org.argeo.security.core/src/org/argeo/security/jcr/jackrabbit/JackrabbitUserAdminService.java @@ -302,6 +302,8 @@ public class JackrabbitUserAdminService implements UserAdminService, Authentication authentication) throws AuthenticationException { UsernamePasswordAuthenticationToken siteAuth = (UsernamePasswordAuthenticationToken) authentication; String username = siteAuth.getName(); + if (!(siteAuth.getCredentials() instanceof char[])) + throw new ArgeoException("Only char array passwords are supported"); char[] password = (char[]) siteAuth.getCredentials(); try { SimpleCredentials sp = new SimpleCredentials(siteAuth.getName(),