Skip to content
This repository has been archived by the owner on Feb 6, 2022. It is now read-only.

Commit

Permalink
bug #263 decode username and password from url (eeemarv)
Browse files Browse the repository at this point in the history
This PR was squashed before being merged into the 3.2-dev branch (closes #263).

Discussion
----------

decode username and password from url

#234

Commits
-------

d170a10 decode username and password from url
  • Loading branch information
fabpot committed Apr 18, 2019
2 parents a9b8d20 + d170a10 commit ac774af
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions DependencyInjection/SwiftmailerTransportFactory.php
Expand Up @@ -104,13 +104,13 @@ public static function resolveOptions(array $options)
$options['transport'] = $parts['scheme'];
}
if (isset($parts['user'])) {
$options['username'] = $parts['user'];
$options['username'] = rawurldecode($parts['user']);
}
if (isset($parts['pass'])) {
$options['password'] = $parts['pass'];
$options['password'] = rawurldecode($parts['pass']);

This comment has been minimized.

Copy link
@kcaporaso

kcaporaso Jul 31, 2019

This seems to break when the password has a "+", like a lot of AWS SES generated passwords have. I get better results when I use 'urldecode'.

This comment has been minimized.

Copy link
@kcaporaso

kcaporaso Jul 31, 2019

I get better results when I turn the + into %2B, I'm guessing that's what's expected.

}
if (isset($parts['host'])) {
$options['host'] = $parts['host'];
$options['host'] = rawurldecode($parts['host']);
}
if (isset($parts['port'])) {
$options['port'] = $parts['port'];
Expand Down

0 comments on commit ac774af

Please sign in to comment.