Skip to content

Customer Email with diacritics isn't allowed #12075

@Drakhunter

Description

@Drakhunter

Magento2 doesn't allow E-Mails with diacritics in CURL Requests.
According to wikipedia this should be allowed, but Magento is restricting it.

Is there a Fix or Workaround or something?

Preconditions

  1. Magento Version 2.1.8

Steps to reproduce

  1. get email address with diacritics (pepé@emailtest.com)
  2. create json data object with email
    $data = [ 'customer' => [ 'email' => pepé@emailtest.com ] ]
  3. create user using curl via /index.php/rest/V1/customers

Expected result

  1. User should be created with correct email address

Actual result

1. {"message":"\"Email\" ist keine g\u00fcltige E-Mail-Adresse." (roughly translated: Email isn't a valid E-Mail-Address)

Additional Notes

Reproduced it via Swagger with using the following query /swagger#/customerAccountManagementV1/customerAccountManagementV1CreateAccountPost
swagger_create customer
The response is :

{
  "message": "\"Email\" is not a valid email address."
}

But this is also reproducible if try to create a customer from Magento Admin
email_from admin

Metadata

Metadata

Labels

Area: APIsComponent: CustomerComponent: EmailIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentPriority: P1Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing.Progress: doneReproduced on 2.1.xThe issue has been reproduced on latest 2.1 releaseReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 releaseReproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchSeverity: S1Affects critical data or functionality and forces users to employ a workaround.

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions