Skip to content
This repository was archived by the owner on Mar 27, 2019. It is now read-only.

Commit 36ed616

Browse files
author
Aleksey Razbakov
authored
Merge pull request #57 from rayphi/magento-1.9.2.4
Applied PATCH_SUPEE-9652 v2 to CE 1.5 - 1.9 and EE 1.9 - 1.13
2 parents 744e69f + 6216594 commit 36ed616

File tree

2 files changed

+21
-8
lines changed

2 files changed

+21
-8
lines changed

app/etc/applied.patches.list

+8
Original file line numberDiff line numberDiff line change
@@ -252,3 +252,11 @@ patching file skin/adminhtml/default/default/media/uploaderSingle.swf
252252
patching file skin/adminhtml/default/default/xmlconnect/boxes.css
253253

254254

255+
2017-02-14 11:34:06 UTC |
256+
257+
258+
259+
2017-02-14 11:34:58 UTC | SUPEE-9652 | EE_1.14.3.1 | v1 | 4038f0785d828794083f53f10c01aaa6af403523 | Tue Jan 24 15:03:12 2017 +0200 | 9586981e6ca8b255014b242d50b68b88525b0754..4038f0785d828794083f53f10c01aaa6af403523
260+
patching file lib/Zend/Mail/Transport/Sendmail.php
261+
262+

lib/Zend/Mail/Transport/Sendmail.php

+13-8
Original file line numberDiff line numberDiff line change
@@ -119,14 +119,19 @@ public function _sendMail()
119119
);
120120
}
121121

122-
set_error_handler(array($this, '_handleMailErrors'));
123-
$result = mail(
124-
$this->recipients,
125-
$this->_mail->getSubject(),
126-
$this->body,
127-
$this->header,
128-
$this->parameters);
129-
restore_error_handler();
122+
// Sanitize the From header
123+
if (!Zend_Validate::is(str_replace(' ', '', $this->parameters), 'EmailAddress')) {
124+
throw new Zend_Mail_Transport_Exception('Potential code injection in From header');
125+
} else {
126+
set_error_handler(array($this, '_handleMailErrors'));
127+
$result = mail(
128+
$this->recipients,
129+
$this->_mail->getSubject(),
130+
$this->body,
131+
$this->header,
132+
$this->parameters);
133+
restore_error_handler();
134+
}
130135
}
131136

132137
if ($this->_errstr !== null || !$result) {

0 commit comments

Comments
 (0)