Skip to content

Conversation

@cviking26
Copy link
Contributor

@cviking26 cviking26 commented Sep 12, 2017

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.

Fixed Issues

Preconditions

  • Magento 2.1.2
  • Enable Double-OptIn Mails for Customer Registration

Steps to reproduce

  • Register as a new Customer with email like "[email protected]" (customer/account/create/)
  • After Redirect to customer/account/login/ click on "Resend Confirmation Link"

Actual Result

  • This redirect to customer/account/confirmation/email/[email protected]/ - 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 [email protected]" without the plus

Expected result

  • Click on "Resend Confirmation Link"
  • Get URL encoded mail in input field on customer/account/confirmation/email/firstname.lastname%[email protected]/
    so Parameter in input field is with "+" char e.g. "[email protected]"

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]));

@magento-cicd2
Copy link
Contributor

magento-cicd2 commented Sep 12, 2017

CLA assistant check
All committers have signed the CLA.

public function getEmailConfirmationUrl($email = null)
{
return $this->urlBuilder->getUrl('customer/account/confirmation', ['email' => $email]);
return $this->urlBuilder->getUrl('customer/account/confirmation', array('_query' => ['email' => $email]));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use short array syntax ([] instead of array())

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ishakhsuvarov thank's. Adapted and pushed.

@ishakhsuvarov ishakhsuvarov self-assigned this Sep 12, 2017
@ishakhsuvarov ishakhsuvarov added this to the September 2017 milestone Sep 12, 2017
@ishakhsuvarov
Copy link
Contributor

@cviking26 Thank you for the update. We are going to proceed with review and merge

@magento-team magento-team merged commit d9bb618 into magento:develop Sep 14, 2017
magento-team pushed a commit that referenced this pull request Sep 14, 2017
magento-team pushed a commit that referenced this pull request Sep 14, 2017
[EngCom] Public Pull Requests
 - MAGETWO-75114: Deprecated Magento\Store\Model\Store::$_isAdminSecure #10877
 - MAGETWO-72539: cviking26_issue-9489 // added query param to url build - description … #10848
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants