From 459c58402b2335a0aa2122a08f71998f401c0d5e Mon Sep 17 00:00:00 2001 From: Adam Rauch Date: Wed, 6 Nov 2024 12:31:13 -0800 Subject: [PATCH] Handle null --- core/src/org/labkey/core/login/LoginController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/org/labkey/core/login/LoginController.java b/core/src/org/labkey/core/login/LoginController.java index 7cce354e292..cbcd2835a75 100644 --- a/core/src/org/labkey/core/login/LoginController.java +++ b/core/src/org/labkey/core/login/LoginController.java @@ -1906,7 +1906,7 @@ public boolean handlePost(SetPasswordForm form, BindException errors) throws Exc } catch (InvalidEmailException e) { - errors.rejectValue("email", ERROR_MSG, "'" + form.getEmail() + "' is not a valid email address. Please enter an email address in this form: user@domain.tld"); + errors.rejectValue("email", ERROR_MSG, "'" + StringUtils.trimToEmpty(form.getEmail()) + "' is not a valid email address. Please enter an email address in this form: user@domain.tld"); } return success;