Skip to content

Commit

Permalink
Update Swiftmailer to avoid potential security risk
Browse files Browse the repository at this point in the history
  • Loading branch information
fguillot committed Jan 6, 2017
1 parent f2a24fb commit febb9ad
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 54 deletions.
4 changes: 2 additions & 2 deletions app/Core/Mail/Transport/Mail.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ public function sendEmail($email, $name, $subject, $html, $author)
$message = Swift_Message::newInstance()
->setSubject($subject)
->setFrom(array($this->helper->mail->getMailSenderAddress() => $author))
->setBody($html, 'text/html')
->setTo(array($email => $name));
->setTo(array($email => $name))
->setBody($html, 'text/html');

Swift_Mailer::newInstance($this->getTransport())->send($message);
} catch (Swift_TransportException $e) {
Expand Down
1 change: 1 addition & 0 deletions app/Core/Mail/Transport/Smtp.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ protected function getTransport()
$transport->setUsername(MAIL_SMTP_USERNAME);
$transport->setPassword(MAIL_SMTP_PASSWORD);
$transport->setEncryption(MAIL_SMTP_ENCRYPTION);

if (HTTP_VERIFY_SSL_CERTIFICATE === false) {
$transport->setStreamOptions(array(
'ssl' => array(
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"paragonie/random_compat": "2.0.2",
"pimple/pimple" : "3.0.2",
"ramsey/array_column": "1.1.3",
"swiftmailer/swiftmailer" : "5.4.2",
"swiftmailer/swiftmailer" : "5.4.5",
"symfony/console" : "2.8.7",
"symfony/event-dispatcher" : "2.7.14",
"gregwar/captcha": "1.1.1"
Expand Down
113 changes: 62 additions & 51 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit febb9ad

Please sign in to comment.