Should return null if user is not valid.
authorMichael Jumper <zhangmaike@users.sourceforge.net>
Wed, 21 Dec 2011 08:09:18 +0000 (00:09 -0800)
committerMichael Jumper <zhangmaike@users.sourceforge.net>
Wed, 21 Dec 2011 08:09:18 +0000 (00:09 -0800)
src/main/java/net/sourceforge/guacamole/net/basic/BasicFileAuthenticationProvider.java

index 0b5b648..91a6b1b 100644 (file)
@@ -137,10 +137,13 @@ public class BasicFileAuthenticationProvider implements AuthenticationProvider<U
         
         // Validate and return info for given user and pass
         AuthInfo info = mapping.get(credentials.getUsername());
-        if (info != null && info.validate(credentials.getUsername(), credentials.getPassword()))
+        if (info != null && info.validate(credentials.getUsername(), credentials.getPassword())) {
             configs.put("DEFAULT", info.getConfiguration());
+            return configs;
+        }
 
-        return configs;
+        // Unauthorized
+        return null;
 
     }