Author: reto
Date: Sun Sep 23 11:02:19 2012
New Revision: 1389013

URL: http://svn.apache.org/viewvc?rev=1389013&view=rev
Log:
STANBOL-721: preventing ArrayIndexOutOfBoundException wehn loggin box is 
submitted empty

Modified:
    
stanbol/trunk/commons/authentication.basic/src/main/java/org/apache/stanbol/commons/authentication/basic/BasicAuthentication.java

Modified: 
stanbol/trunk/commons/authentication.basic/src/main/java/org/apache/stanbol/commons/authentication/basic/BasicAuthentication.java
URL: 
http://svn.apache.org/viewvc/stanbol/trunk/commons/authentication.basic/src/main/java/org/apache/stanbol/commons/authentication/basic/BasicAuthentication.java?rev=1389013&r1=1389012&r2=1389013&view=diff
==============================================================================
--- 
stanbol/trunk/commons/authentication.basic/src/main/java/org/apache/stanbol/commons/authentication/basic/BasicAuthentication.java
 (original)
+++ 
stanbol/trunk/commons/authentication.basic/src/main/java/org/apache/stanbol/commons/authentication/basic/BasicAuthentication.java
 Sun Sep 23 11:02:19 2012
@@ -69,6 +69,9 @@ public class BasicAuthentication impleme
                if (authorization != null) {
                        String authBase64 = 
authorization.substring(authorization.indexOf(' ') + 1);
                        String[] credentials = new 
String(Base64.decode(authBase64)).split(":");
+                       if (credentials.length == 0) {
+                               return false;
+                       }
                        String userName = credentials[0];
                        String password;
                        if (credentials.length > 1) {


Reply via email to