Skip to content

Error while resend account confirmation link with special chars (e.g. "+" in email) #9489

@cviking26

Description

@cviking26

There is an error while click on "resend confirmation mail". The mail address will transfered without special chars like "+". This is important for the new gmail feature which provides simply adding aliases.

Preconditions

  1. Magento 2.1.2
  2. Enable Double-OptIn Mails for Customer Registration

Steps to reproduce

  1. Register as a new Customer with email like "firstname.lastname+PARAM@gmail.com" (customer/account/create/)
  2. After Redirect to customer/account/login/ click on "Resend Confirmation Link"

Actual Result

  1. This redirect to customer/account/confirmation/email/firstname.lastname+PARAM@gmail.com/ - The Parameter email in url is not urlencoded, so the param is missing in the input field.
    Parameter on this page in input field is now "firstname.lastname PARAM@gmail.com" without the plus

Expected result

  1. Click on "Resend Confirmation Link"
  2. Get URL encoded mail in input field on customer/account/confirmation/email/firstname.lastname%2BPARAM@gmail.com/
    so Parameter in input field is with "+" char e.g. "firstname.lastname+PARAM@gmail.com"

Solution

Bug can solved simply adding "_query" in htdocs/vendor/magento/module-customer/Model/Url.php:221

return $this->urlBuilder->getUrl('customer/account/confirmation', array('_query' => ['email' => $email]));

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue: Cannot ReproduceCannot reproduce the issue on the latest `2.4-develop` branchIssue: 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 passed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions