Workaround to the get the customer order view working with email addresses that include a "+" character#1391
Workaround to the get the customer order view working with email addresses that include a "+" character#1391pbek wants to merge 3 commits intoezsystems:masterfrom
Conversation
…esses that include a "+" character
|
Travis fails with |
yeah that is not relevant here. |
|
It would be good to have steps to reproduce that issue. |
|
@pkamps, please see: https://jira.ez.no/browse/EZP-24798 |
|
OK, I will try if I can reproduce the issue. I honestly don't have a webshop site currently. |
|
@pkamps, I tested your pull request and it didn't solve the issue of showing customer information with urls like https://your-server/admin/shop/customerorderview/10/test%2Btest@test.com |
|
@pbek You're right, the patch from #1360 is not enough to fix the issue. I see that you fixed the missing url encoding in the template - that was missing and is not a workaround. I don't think you need to work with a query parameter The additional URL decoding So it's safe to just remove that line from the code base. |
|
Oh, and maybe you still need the patch from #1360 - but I'm not sure, there is a chance it works without that patch. |
|
@pkamps @pbek
So: But as I see this is exactly what #1360 should be fixing. |
kernel/shop/customerorderview.php
Outdated
|
|
||
| $Email = urldecode( $Email ); | ||
| // allow usage of get parameter as well which is safer for some email formats | ||
| if ( $Email ) |
There was a problem hiding this comment.
This will always be true, unless $Email would be set null or false, which won't happen because of the line 10.
I sugest:
$Email = urldecode( $Email );
if ( $http->hasGetVariable( "email" ) )
{
$Email = $http->getVariable( "email" );
}There was a problem hiding this comment.
@mateuszbieniek, that is what I had before I followed the suggestion of @andrerom in #1199 (comment) 😬
There was a problem hiding this comment.
I now changed it back to your suggestion.
|
That's how we'll fix the issue in our fork: |
that didn't seem to work for me, the urlencoded |
|
I have to test it, but it seems like mugoweb#119 alongside with #1360 seems like a good approach and should work. |
|
I would also like if my workaround with the extra get-parameter isn't needed any more. |
This is a continuation of the closed pull request #1199 with suggested changes from @andrerom.