Handle possible NPE in mapping loader.
This commit is contained in:
1 parent
493b43fe27
commit
8b8ee8dae3
1 file changed
+5
+5
@@ -100,6 +100,11 @@ public class BasicFileAuthenticationProvider implements AuthenticationProvider {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If no mapping available, report as such
|
||||||
|
if (mapping == null)
|
||||||
|
throw new GuacamoleException("User mapping could not be read.");
|
||||||
|
|
||||||
|
// Validate and return info for given user and pass
|
||||||
AuthInfo info = mapping.get(username);
|
AuthInfo info = mapping.get(username);
|
||||||
if (info != null && info.validate(username, password))
|
if (info != null && info.validate(username, password))
|
||||||
return info.getConfiguration();
|
return info.getConfiguration();
|
||||||
|
|||||||
Reference in new issue
Block a user