Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Commit af2c70f

Browse files
authored
Merge pull request #80 from SnowCommerceBrand/magento-1.9
Updated to Magento 1.9.4.3
2 parents e6078ab + 99b772f commit af2c70f

File tree

221 files changed

+3605
-787
lines changed

Some content is hidden

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

221 files changed

+3605
-787
lines changed

RELEASE_NOTES.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
==== 1.9.4.3 ====
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.4.2 ====
212
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
313
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

app/Mage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ public static function getVersionInfo()
174174
'major' => '1',
175175
'minor' => '9',
176176
'revision' => '4',
177-
'patch' => '2',
177+
'patch' => '3',
178178
'stability' => '',
179179
'number' => '',
180180
);

app/code/core/Mage/Admin/Model/User.php

Lines changed: 38 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,25 @@ class Mage_Admin_Model_User extends Mage_Core_Model_Abstract
7474

7575
/**
7676
* Minimum length of admin password
77+
* @deprecated Use getMinAdminPasswordLength() method instead
7778
*/
78-
const MIN_PASSWORD_LENGTH = 7;
79+
const MIN_PASSWORD_LENGTH = 14;
80+
81+
/**
82+
* Configuration path for minimum length of admin password
83+
*/
84+
const XML_PATH_MIN_ADMIN_PASSWORD_LENGTH = 'admin/security/min_admin_password_length';
7985

8086
/**
8187
* Length of salt
8288
*/
8389
const HASH_SALT_LENGTH = 32;
8490

91+
/**
92+
* Empty hash salt
93+
*/
94+
const HASH_SALT_EMPTY = null;
95+
8596
/**
8697
* Model event prefix
8798
*
@@ -459,7 +470,7 @@ public function hasAssigned2Role($user)
459470
*/
460471
protected function _getEncodedPassword($password)
461472
{
462-
return $this->_getHelper('core')->getHash($password, self::HASH_SALT_LENGTH);
473+
return $this->_getHelper('core')->getHashPassword($password, self::HASH_SALT_LENGTH);
463474
}
464475

465476
/**
@@ -569,17 +580,23 @@ public function validate()
569580
}
570581

571582
if ($this->hasNewPassword()) {
572-
if (Mage::helper('core/string')->strlen($this->getNewPassword()) < self::MIN_PASSWORD_LENGTH) {
573-
$errors[] = Mage::helper('adminhtml')->__('Password must be at least of %d characters.', self::MIN_PASSWORD_LENGTH);
583+
$password = $this->getNewPassword();
584+
} elseif ($this->hasPassword()) {
585+
$password = $this->getPassword();
586+
}
587+
if (isset($password)) {
588+
$minAdminPasswordLength = $this->getMinAdminPasswordLength();
589+
if (Mage::helper('core/string')->strlen($password) < $minAdminPasswordLength) {
590+
$errors[] = Mage::helper('adminhtml')
591+
->__('Password must be at least of %d characters.', $minAdminPasswordLength);
574592
}
575593

576-
if (!preg_match('/[a-z]/iu', $this->getNewPassword())
577-
|| !preg_match('/[0-9]/u', $this->getNewPassword())
578-
) {
579-
$errors[] = Mage::helper('adminhtml')->__('Password must include both numeric and alphabetic characters.');
594+
if (!preg_match('/[a-z]/iu', $password) || !preg_match('/[0-9]/u', $password)) {
595+
$errors[] = Mage::helper('adminhtml')
596+
->__('Password must include both numeric and alphabetic characters.');
580597
}
581598

582-
if ($this->hasPasswordConfirmation() && $this->getNewPassword() != $this->getPasswordConfirmation()) {
599+
if ($this->hasPasswordConfirmation() && $password != $this->getPasswordConfirmation()) {
583600
$errors[] = Mage::helper('adminhtml')->__('Password confirmation must be same as password.');
584601
}
585602

@@ -745,4 +762,16 @@ public function getUserCreateAdditionalEmail()
745762
$emails = str_replace(' ', '', Mage::getStoreConfig(self::XML_PATH_ADDITIONAL_EMAILS));
746763
return explode(',', $emails);
747764
}
765+
766+
/**
767+
* Retrieve minimum length of admin password
768+
*
769+
* @return int
770+
*/
771+
public function getMinAdminPasswordLength()
772+
{
773+
$minLength = (int)Mage::getStoreConfig(self::XML_PATH_MIN_ADMIN_PASSWORD_LENGTH);
774+
$absoluteMinLength = Mage_Core_Model_App::ABSOLUTE_MIN_PASSWORD_LENGTH;
775+
return ($minLength < $absoluteMinLength) ? $absoluteMinLength : $minLength;
776+
}
748777
}

app/code/core/Mage/Admin/etc/config.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<config>
2929
<modules>
3030
<Mage_Admin>
31-
<version>1.6.1.2</version>
31+
<version>1.6.1.3</version>
3232
</Mage_Admin>
3333
</modules>
3434
<global>
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<?php
2+
/**
3+
* Magento
4+
*
5+
* NOTICE OF LICENSE
6+
*
7+
* This source file is subject to the Open Software License (OSL 3.0)
8+
* that is bundled with this package in the file LICENSE.txt.
9+
* It is also available through the world-wide-web at this URL:
10+
* http://opensource.org/licenses/osl-3.0.php
11+
* If you did not receive a copy of the license and are unable to
12+
* obtain it through the world-wide-web, please send an email
13+
* to [email protected] so we can send you a copy immediately.
14+
*
15+
* DISCLAIMER
16+
*
17+
* Do not edit or add to this file if you wish to upgrade Magento to newer
18+
* versions in the future. If you wish to customize Magento for your
19+
* needs please refer to http://www.magento.com for more information.
20+
*
21+
* @category Mage
22+
* @package Mage_Admin
23+
* @copyright Copyright (c) 2006-2019 Magento, Inc. (http://www.magento.com)
24+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25+
*/
26+
27+
/** @var $installer Mage_Core_Model_Resource_Setup */
28+
$installer = $this;
29+
$installer->startSetup();
30+
31+
//Increase password field length
32+
$installer->getConnection()->changeColumn(
33+
$installer->getTable('admin/user'),
34+
'password',
35+
'password',
36+
array(
37+
'type' => Varien_Db_Ddl_Table::TYPE_TEXT,
38+
'length' => 255,
39+
'comment' => 'User Password',
40+
)
41+
);
42+
43+
$installer->endSetup();

app/code/core/Mage/Adminhtml/Block/Api/User/Edit/Tab/Main.php

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,13 +96,16 @@ protected function _prepareForm()
9696
)
9797
);
9898

99+
$minPasswordLength = Mage::getModel('customer/customer')->getMinPasswordLength();
99100
if ($model->getUserId()) {
100101
$fieldset->addField('password', 'password', array(
101102
'name' => 'new_api_key',
102103
'label' => Mage::helper('adminhtml')->__('New API Key'),
103104
'id' => 'new_pass',
104105
'title' => Mage::helper('adminhtml')->__('New API Key'),
105-
'class' => 'input-text validate-password',
106+
'class' => 'input-text validate-password min-pass-length-' . $minPasswordLength,
107+
'note' => Mage::helper('adminhtml')
108+
->__('API Key must be at least of %d characters.', $minPasswordLength),
106109
));
107110

108111
$fieldset->addField('confirmation', 'password', array(
@@ -113,15 +116,17 @@ protected function _prepareForm()
113116
));
114117
}
115118
else {
116-
$fieldset->addField('password', 'password', array(
119+
$fieldset->addField('password', 'password', array(
117120
'name' => 'api_key',
118121
'label' => Mage::helper('adminhtml')->__('API Key'),
119122
'id' => 'customer_pass',
120123
'title' => Mage::helper('adminhtml')->__('API Key'),
121-
'class' => 'input-text required-entry validate-password',
124+
'class' => 'input-text required-entry validate-password min-pass-length-' . $minPasswordLength,
122125
'required' => true,
126+
'note' => Mage::helper('adminhtml')
127+
->__('API Key must be at least of %d characters.', $minPasswordLength),
123128
));
124-
$fieldset->addField('confirmation', 'password', array(
129+
$fieldset->addField('confirmation', 'password', array(
125130
'name' => 'api_key_confirmation',
126131
'label' => Mage::helper('adminhtml')->__('API Key Confirmation'),
127132
'id' => 'confirmation',

app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Main.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,13 @@ protected function _prepareLayout()
9393
'class' => 'save'
9494
)));
9595

96+
$deleteConfirmMessage = $this->jsQuoteEscape(Mage::helper('catalog')
97+
->__('All products of this set will be deleted! Are you sure you want to delete this attribute set?'));
98+
$deleteUrl = $this->getUrlSecure('*/*/delete', array('id' => $setId));
9699
$this->setChild('delete_button',
97100
$this->getLayout()->createBlock('adminhtml/widget_button')->setData(array(
98101
'label' => Mage::helper('catalog')->__('Delete Attribute Set'),
99-
'onclick' => 'deleteConfirm(\''. $this->jsQuoteEscape(Mage::helper('catalog')->__('All products of this set will be deleted! Are you sure you want to delete this attribute set?')) . '\', \'' . $this->getUrl('*/*/delete', array('id' => $setId)) . '\')',
102+
'onclick' => 'deleteConfirm(\'' . $deleteConfirmMessage . '\', \'' . $deleteUrl . '\')',
100103
'class' => 'delete'
101104
)));
102105

app/code/core/Mage/Adminhtml/Block/Customer/Edit/Renderer/Newpass.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,11 @@ public function render(Varien_Data_Form_Element_Abstract $element)
4545
{
4646
$html = '<tr>';
4747
$html .= '<td class="label">' . $element->getLabelHtml() . '</td>';
48-
$html .= '<td class="value">' . $element->getElementHtml() . '</td>';
48+
$html .= '<td class="value">' . $element->getElementHtml();
49+
if ($element->getNote()) {
50+
$html .= '<p class="note"><span>' . $element->getNote() . '</span></p>';
51+
}
52+
$html .= '</td>';
4953
$html .= '</tr>' . "\n";
5054
$html .= '<tr>';
5155
$html .= '<td class="label"><label>&nbsp;</label></td>';

app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Account.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ function(v, elem){
163163
}
164164
}
165165

166+
$minPasswordLength = Mage::getModel('customer/customer')->getMinPasswordLength();
166167
if ($customer->getId()) {
167168
if (!$customer->isReadonly()) {
168169
// Add password management fieldset
@@ -175,7 +176,9 @@ function(v, elem){
175176
array(
176177
'label' => Mage::helper('customer')->__('New Password'),
177178
'name' => 'new_password',
178-
'class' => 'validate-new-password'
179+
'class' => 'validate-new-password min-pass-length-' . $minPasswordLength,
180+
'note' => Mage::helper('adminhtml')
181+
->__('Password must be at least of %d characters.', $minPasswordLength),
179182
)
180183
);
181184
$field->setRenderer($this->getLayout()->createBlock('adminhtml/customer_edit_renderer_newpass'));
@@ -224,9 +227,11 @@ function(v, elem){
224227
$field = $newFieldset->addField('password', 'text',
225228
array(
226229
'label' => Mage::helper('customer')->__('Password'),
227-
'class' => 'input-text required-entry validate-password',
230+
'class' => 'input-text required-entry validate-password min-pass-length-' . $minPasswordLength,
228231
'name' => 'password',
229-
'required' => true
232+
'required' => true,
233+
'note' => Mage::helper('adminhtml')
234+
->__('Password must be at least of %d characters.', $minPasswordLength),
230235
)
231236
);
232237
$field->setRenderer($this->getLayout()->createBlock('adminhtml/customer_edit_renderer_newpass'));

app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Preview.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ protected function _toHtml()
7575
$templateProcessed = "<pre>" . htmlspecialchars($templateProcessed) . "</pre>";
7676
}
7777

78+
$templateProcessed = Mage::getSingleton('core/input_filter_maliciousCode')
79+
->linkFilter($templateProcessed);
80+
7881
Varien_Profiler::stop("newsletter_queue_proccessing");
7982

8083
return $templateProcessed;

0 commit comments

Comments
 (0)