symfony / swiftmailer-bundle

Symfony Swiftmailer Bundle
https://symfony.com/swiftmailer-bundle
MIT License
1.56k stars 151 forks source link

decode username and password from url #263

Closed eeemarv closed 5 years ago

eeemarv commented 5 years ago

234

naderman commented 5 years ago

@eeemarv stof suggested you do this instead: https://github.com/symfony/swiftmailer-bundle/issues/270#issuecomment-448266067

eeemarv commented 5 years ago

Now using rawurldecode() and including host.

naderman commented 5 years ago

In summary, this PR fixes https://github.com/symfony/swiftmailer-bundle/issues/234 https://github.com/symfony/swiftmailer-bundle/issues/270 and https://github.com/symfony/swiftmailer-bundle/issues/276

eeemarv commented 5 years ago

Sorry, I just noticed the naming of the commit is wrong. It should be "rawurlDECode() host, username and password" instead of "rawurlencode". In the code the right function is used though.

eeemarv commented 5 years ago

Note the query part is already urldecoded as the parse_str() function does this.

naderman commented 5 years ago

@fabpot I know you're focused on Mailer these days, but mind merging this? I think it's a somewhat common problem to run into on a current Symfony4 project, e.g. when following the docs on sending email with GMail https://symfony.com/doc/current/email.html#using-gmail-to-send-emails This will not currently work if a password contains non-ascii characters, even if they get encoded.

fabpot commented 5 years ago

Thank you @eeemarv.