GUACAMOLE-103: Transform username only if present.

This commit is contained in:
Michael Jumper
2020-06-24 20:34:52 -07:00
parent a2c8f461be
commit 9d415469f8

View File

@@ -131,9 +131,12 @@ public class AuthenticationProviderService {
samlResponse.validateTimestamps();
// Grab the username, and, if present, finish authentication.
String username = samlResponse.getNameId().toLowerCase();
String username = samlResponse.getNameId();
if (username != null) {
// Canonicalize username as lowercase
username = username.toLowerCase();
// Retrieve any provided attributes
Map<String, List<String>> attributes =
samlResponse.getAttributes();