-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Closed
Description
Symfony version(s) affected
>= 4.4
Description
There seems to be an inconsistency in the handling of special characters in the DSN within the Symfony Mailer component. According to the Mailer Documentation, special characters in the host (like /) should be URL-encoded. However, upon inspecting the source code, it appears that $parsedDsn['host'] is not URL-decoded.
How to reproduce
- Create a DSN string with special characters like
api.example%2Ffoo%2Fbar%2Fbaz, etc., in the host. - Pass this DSN string to the Mailer component.
- Observe that the DSN parsing does not URL-decode the host.
Possible Solution
- Implement URL decoding for the host in the DSN parsing logic at this point in the code.
Additional Context
I am willing to create a Pull Request to address this issue if the Symfony team agrees that this behavior needs correction.