Skip to content

Commit f9188bd

Browse files
authored
Merge pull request #53 from Schrank/magento-1.9
Import Magento Release 1.9.3.7
2 parents f4b5f15 + a5ad2ee commit f9188bd

File tree

69 files changed

+544
-203
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+544
-203
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

RELEASE_NOTES.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
==== 1.9.3.7 ====
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4+
] NOTE: Current Release Notes are maintained at: [
5+
] [
6+
] http://devdocs.magento.com/guides/m1x/ce19-ee114/ce1.9_release-notes.html [
7+
] [
8+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
9+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10+
111
==== 1.9.3.6 ====
212
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
313
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

app/Mage.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ public static function getVersionInfo()
171171
'major' => '1',
172172
'minor' => '9',
173173
'revision' => '3',
174-
'patch' => '6',
174+
'patch' => '7',
175175
'stability' => '',
176176
'number' => '',
177177
);
@@ -805,7 +805,12 @@ public static function log($message, $level = null, $file = '', $forceLog = fals
805805
static $loggers = array();
806806

807807
$level = is_null($level) ? Zend_Log::DEBUG : $level;
808-
$file = empty($file) ? 'system.log' : $file;
808+
$file = empty($file) ? 'system.log' : basename($file);
809+
810+
// Validate file extension before save. Allowed file extensions: log, txt, html, csv
811+
if (!self::helper('log')->isLogFileExtensionValid($file)) {
812+
return;
813+
}
809814

810815
try {
811816
if (!isset($loggers[$file])) {

app/code/core/Mage/Adminhtml/Block/Report/Review/Detail.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function __construct()
4040
$this->_controller = 'report_review_detail';
4141

4242
$product = Mage::getModel('catalog/product')->load($this->getRequest()->getParam('id'));
43-
$this->_headerText = Mage::helper('reports')->__('Reviews for %s', $product->getName());
43+
$this->_headerText = Mage::helper('reports')->__('Reviews for %s', $this->escapeHtml($product->getName()));
4444

4545
parent::__construct();
4646
$this->_removeButton('add');

app/code/core/Mage/Adminhtml/Block/Report/Tag/Product/Detail.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function __construct()
4141

4242
$product = Mage::getModel('catalog/product')->load($this->getRequest()->getParam('id'));
4343

44-
$this->_headerText = Mage::helper('reports')->__('Tags submitted to %s', $product->getName());
44+
$this->_headerText = Mage::helper('reports')->__('Tags submitted to %s', $this->escapeHtml($product->getName()));
4545
parent::__construct();
4646
$this->_removeButton('add');
4747
$this->setBackUrl($this->getUrl('*/report_tag/product/'));

app/code/core/Mage/Adminhtml/Block/Review/Add.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public function __construct()
9999
} else if( response.id ){
100100
$("product_id").value = response.id;
101101
102-
$("product_name").innerHTML = \'<a href="' . $this->getUrl('*/catalog_product/edit') . 'id/\' + response.id + \'" target="_blank">\' + response.name + \'</a>\';
102+
$("product_name").innerHTML = \'<a href="' . $this->getUrl('*/catalog_product/edit') . 'id/\' + response.id + \'" target="_blank">\' + response.name.escapeHTML() + \'</a>\';
103103
} else if( response.message ) {
104104
alert(response.message);
105105
}

app/code/core/Mage/Adminhtml/Block/Review/Edit/Form.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,10 @@ protected function _prepareForm()
5050

5151
$fieldset->addField('product_name', 'note', array(
5252
'label' => Mage::helper('review')->__('Product'),
53-
'text' => '<a href="' . $this->getUrl('*/catalog_product/edit', array('id' => $product->getId())) . '" onclick="this.target=\'blank\'">' . $product->getName() . '</a>'
53+
'text' => '<a href="' . $this->getUrl('*/catalog_product/edit', array('id' => $product->getId())) . '" onclick="this.target=\'blank\'">' . $this->escapeHtml($product->getName()) . '</a>'
5454
));
5555

56+
$customerText = '';
5657
if ($customer->getId()) {
5758
$customerText = Mage::helper('review')->__('<a href="%1$s" onclick="this.target=\'blank\'">%2$s</a> <a href="mailto:%3$s">(%3$s)</a>', $this->getUrl('*/customer/edit', array('id' => $customer->getId(), 'active_tab' => 'review')), $this->escapeHtml($customer->getName()), $this->escapeHtml($customer->getEmail()));
5859
} else {

app/code/core/Mage/Adminhtml/Controller/Action.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ public function preDispatch()
186186
'message' => $_keyErrorMsg
187187
)));
188188
} else {
189-
if ($_keyErrorMsg != ''){
189+
if (!$_isValidFormKey){
190190
Mage::getSingleton('adminhtml/session')->addError($_keyErrorMsg);
191191
}
192192
$this->_redirect( Mage::getSingleton('admin/session')->getUser()->getStartupPageUrl() );

app/code/core/Mage/Adminhtml/Model/LayoutUpdate/Validator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ public function isValid($value)
142142
protected function _validateTemplatePath(array $templatePaths)
143143
{
144144
foreach ($templatePaths as $path) {
145-
if (strpos($path, '../') !== false) {
145+
if (strpos($path, '..' . DS) !== false) {
146146
throw new Exception();
147147
}
148148
}

app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Filename.php

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,37 @@
2727

2828
class Mage_Adminhtml_Model_System_Config_Backend_Filename extends Mage_Core_Model_Config_Data
2929
{
30+
31+
/**
32+
* Config path for system log file.
33+
*/
34+
const DEV_LOG_FILE_PATH = 'dev/log/file';
35+
36+
/**
37+
* Config path for exception log file.
38+
*/
39+
const DEV_LOG_EXCEPTION_FILE_PATH = 'dev/log/exception_file';
40+
41+
/**
42+
* Processing object before save data
43+
*
44+
* @return Mage_Adminhtml_Model_System_Config_Backend_Filename
45+
* @throws Mage_Core_Exception
46+
*/
3047
protected function _beforeSave()
3148
{
32-
$value = $this->getValue();
33-
$value = basename($value);
49+
$value = $this->getValue();
50+
$configPath = $this->getPath();
51+
$value = basename($value);
52+
53+
// if dev/log setting, validate log file extension.
54+
if ($configPath == self::DEV_LOG_FILE_PATH || $configPath == self::DEV_LOG_EXCEPTION_FILE_PATH) {
55+
if (!Mage::helper('log')->isLogFileExtensionValid($value)) {
56+
throw Mage::exception('Mage_Core', Mage::helper('adminhtml')->__
57+
('Invalid file extension used for log file. Allowed file extensions: log, txt, html, csv'));
58+
}
59+
}
60+
3461
$this->setValue($value);
3562
return $this;
3663
}

0 commit comments

Comments
 (0)