diff --git a/olat3/webapp/WEB-INF/src/org/olat/shibboleth/ShibbolethRegistrationWithEmailForm.java b/olat3/webapp/WEB-INF/src/org/olat/shibboleth/ShibbolethRegistrationWithEmailForm.java index 380dc09ff6d22c73942c75d65f662fe77a5b96eb..176beee0e96ac695a1b606225a2df37c36bda96e 100644 --- a/olat3/webapp/WEB-INF/src/org/olat/shibboleth/ShibbolethRegistrationWithEmailForm.java +++ b/olat3/webapp/WEB-INF/src/org/olat/shibboleth/ShibbolethRegistrationWithEmailForm.java @@ -30,6 +30,7 @@ import org.olat.core.gui.control.Controller; import org.olat.core.gui.control.Event; import org.olat.core.gui.control.WindowControl; import org.olat.core.id.Identity; +import org.olat.core.util.mail.MailHelper; import org.olat.user.UserManager; /** @@ -65,16 +66,11 @@ public class ShibbolethRegistrationWithEmailForm extends FormBasicController { return false; } - if (!eMail.getValue().matches(".+@.+\\..+")) { + if (!MailHelper.isValidEmailAddress(getEmail())){ eMail.setErrorKey("srf.error.email.valid", null); return false; } - if (eMail.getValue().matches("^[^<>\"' \t\n\r]*$")) { - eMail.setErrorKey("srf.error.email.badcharacters", null); - return false; - } - // check if email is already used by another useraccount Identity foundIdentity = UserManager.getInstance().findIdentityByEmail(eMail.getValue()); if (foundIdentity != null) { diff --git a/olat3/webapp/WEB-INF/src/org/olat/shibboleth/_i18n/LocalStrings_de.properties b/olat3/webapp/WEB-INF/src/org/olat/shibboleth/_i18n/LocalStrings_de.properties index 5e981266ea0e67570cd4339996797fd6b8554776..6cfcc87ebfe78a0a155b41bccd71f86d56a9d7a6 100644 --- a/olat3/webapp/WEB-INF/src/org/olat/shibboleth/_i18n/LocalStrings_de.properties +++ b/olat3/webapp/WEB-INF/src/org/olat/shibboleth/_i18n/LocalStrings_de.properties @@ -50,7 +50,6 @@ sr.login.meantimetaken=Der gew\u00E4hlte Benutzername ist bereits registriert. B sr.select_language=W\u00E4hlen Sie die Sprache f\u00FCr die OLAT Registrierung und Ihr Benutzerkonto. Sie k\u00F6nnen die Sprache sp\u00E4ter in Ihrem Benutzerprofil jederzeit anpassen. Anschliessend werden Sie durch den Registrationprozess gef\u00FChrt. srf.email=E-Mail-Adresse srf.error.blacklist=Der gew\u00E4hlte Benutzername wurde nicht akzeptiert. -srf.error.email.badcharacters=Die E-Mail-Adresse darf keine Zeichen wie <,>,",', Leerschl\u00E4ge oder Tabulatoren enthalten srf.error.email.empty=Die E-Mail-Adresse darf nicht leer sein srf.error.email.usedByOtherUser=Diese E-Mail-Adresse wird bereits von einem anderen Benutzer verwendet srf.error.email.valid=Bitte geben Sie eine g\u00FCltige E-Mail-Adresse ein diff --git a/olat3/webapp/WEB-INF/src/org/olat/shibboleth/_i18n/LocalStrings_en.properties b/olat3/webapp/WEB-INF/src/org/olat/shibboleth/_i18n/LocalStrings_en.properties index 9c97d9c8b3d7d9e2ee322dbf468420830d1c839c..43bc57d444d81d58a31dd3abba8fc8f94fb65c0f 100644 --- a/olat3/webapp/WEB-INF/src/org/olat/shibboleth/_i18n/LocalStrings_en.properties +++ b/olat3/webapp/WEB-INF/src/org/olat/shibboleth/_i18n/LocalStrings_en.properties @@ -50,7 +50,6 @@ sr.login.meantimetaken=This user name is already in use. Please choose another o sr.select_language=Please select a language for your OLAT registration and user account. Later you can still adapt your language in your user profile. You will then be guided through the registration process. srf.email=E-mail address srf.error.blacklist=The selected user name has not been accepted. -srf.error.email.badcharacters=Your e-mail address must not contain characters such as <,>,",', blanks or tabs. srf.error.email.empty=You have to fill in your e-mail address. srf.error.email.usedByOtherUser=This e-mail address is already used by someone else. srf.error.email.valid=Please indicate a valid e-mail address.