U4-10439 - Email validation in installer, User and Member editor need to be the same

Created by Sebastiaan Janssen 20 Sep 2017, 11:46:27 Updated by Shannon Deminick 27 Sep 2017, 13:18:38

Tags: Unscheduled

Relates to: U4-10435

Subtask of: U4-9609

I can install Umbraco with the email address admin@admin.admin but the validation in the user editor doesn't like this email address and just removes it so I am forced to come up with a different one. Email address validation needs to be the same for both.

Additionally: the email address validation here is clearly wrong, the .admin top level domain could be totally valid. I propose we use a super simple validation of the format instead, this one seems very reasonable: https://stackoverflow.com/a/742588/5018



Note: we'll also need to apply the same validation to the members editor.

1 Attachments


Shannon Deminick 21 Sep 2017, 05:24:32

We've been down this path before at some stage, there's already an email validator that works for all email addresses in the core and is the same for both JS and .NET IIRC.

Also i didn't realize that the NewInstallStep is still using membership provider logic ... doh! there's a TODO in there: //TODO: Change all logic in this step to use ASP.NET Identity NOT MembershipProviders which was overlooked for 7.7 since all of the credential APIs should have been changed over to Identity.

Sebastiaan Janssen 21 Sep 2017, 06:53:35

If you can point me to the validation then I'd like to see it, currently admin@admin.pizza is not accepted in the user editor which is a valid email address. This is accepted in the installer though.

Sebastiaan Janssen 26 Sep 2017, 11:01:18

I think the problem might be more that AuthenticationController.GetMembershipProviderConfig (used in the new User editor) is using the UserService for validation of email addresses and the InstallerApiController is not validating in the same way (not at all, it seems).

So I still think we need to:

  1. Loosen up email validation
  2. Make the validation the same everywhere (including the installer)

Sebastiaan Janssen 26 Sep 2017, 11:02:27

Ah.. nope GetMembershipProviderConfig isn't returning email validation either.

Sebastiaan Janssen 26 Sep 2017, 11:11:03

Okay, turns out <input type="email" /> is the problem here.

Sebastiaan Janssen 26 Sep 2017, 13:32:28

Seemingly such a simple issue.. read the PR notes please! https://github.com/umbraco/Umbraco-CMS/pull/2215

Shannon Deminick 27 Sep 2017, 12:51:27

Have merged in and pushed another commit: 22ff362521fb9c34eb2ea5f588d4b93bf2ed6cc9 (see my notes in the PR)

Priority: Normal

Type: Bug

State: Fixed


Difficulty: Normal


Backwards Compatible: True

Fix Submitted:

Affected versions: 7.7.0, 7.7.1

Due in version: 7.7.2

Sprint: Sprint 68

Story Points: 1