mollie / Shopware6

47 stars 52 forks source link

Apple Pay Endpoints Broken when domain contains numbers or special characters #768

Closed timeo-schmidt closed 2 months ago

timeo-schmidt commented 2 months ago

Hello!

Shopware 6.5.7.3 / Mollie 4.9.0 Our shop domain is of the format abc123.abc-def.de

The store-api endpoint /store-api/mollie/applepay/validate is currently broken. The error message is that the validationUrl not on the whitelist.

If I change the function in the following line from getAlnum to simply get, everything works.

https://github.com/mollie/Shopware6/blob/68dc57e927a7447562f772de95b866749ddf8131/src/Controller/StoreApi/ApplePayDirect/ApplePayDirectControllerBase.php#L116

It is likely that this is due to the domain naming containing numbers or special characters.

Although Christian has asked me to open a PR, I am unfortunately not confident with PHP and furthermore, I am unsure which other places in your plugin may be affected by the same bug as well.

I would highly appreciate your fixes!

Best regards from Hamburg!