安全修补程序SUPEE-10415-可能的问题?


37

Magento 1的新补丁已发布,即SUPEE-10415

此修补程序提供了针对多种类型的与安全相关的问题的保护

信息页面:https : //magento.com/security/patches/supee-10415
下载页面:https : //magento.com/tech-resources/download

需要注意哪些可能的问题?

另外,请分享安装补丁后发现的所有错误和问题。


  • 在香草1.9.1.1上应用SUPEE-10415的问题,由于Image.php出现错误消息而导致显示无法应用。 编辑:自2017年12月7日起,SUPEE-10497中提供了修复程序

  • 必须安装8788版本2,否则将看到“不支持的数据类型”错误。更多信息。

  • 升级到SUPEE-10415后,错误/目录中出现“ 404:未找到页面”错误。仅在运行某些第三方扩展的Magento安装中会发生此问题。
    解决方法:确认任何扩展或自定义项均未生成PHP警告。

5
此处在Magento 1.9.2.4CE上没有任何问题地部署-大多数更改似乎是管理变量的环境卫生,特别是日志文件保存。在消毒方面,肥皂api似乎也有一些变化。管理区也对评论进行了清理,因此可能存在一个利用漏洞,可以在恶意(投机性)评论中发布恶意代码
Ricky Odin Matthews

2
部署到Magento 1.9.3.0 CE在这里没有问题。如果尚未应用该补丁,则需要10266之前的补丁。
danmentzer

1
在1.9.1.0上-在“购物车价格规则”中,补丁导致失败-查看规则上的硬错误-日志条目-a:5:{i:0; s:23:“不支持的数据类型N”; i: 1; s:1464:“#0 /opt/bitnami/apps/magento/htdocs/lib/Unserialize/Reader/Arr.php(102):Unserialize_Reader_ArrValue-> read('N',';')----补丁逆转固定,因此一些是在SUPEE-10415
Laith

1
我没有发布答案的声誉,但是您不能升级到Magento 1.9.3.7,然后使用Git与该补丁合并:如果您使用默认的Git行为,则将MAXIMUM_PASSWORD_LENGTH常数添加两次(不知道是否存在设置是解决方法)。
toon81 '17

1
对于1.9.1.1问题:请改用SUPEE-10497,它是最近发布的,用于在1.9.1.1上解决此问题。请阅读发行说明,因为此补丁要求在安装前删除SUPEE-10266。
Piotr Kaminski

Answers:


26

在应用补丁SUPEE-10415之后,以下文件被更新/添加

app/Mage.php
app/code/core/Mage/Adminhtml/Block/Report/Review/Detail.php
app/code/core/Mage/Adminhtml/Block/Report/Tag/Product/Detail.php
app/code/core/Mage/Adminhtml/Block/Review/Add.php
app/code/core/Mage/Adminhtml/Block/Review/Edit/Form.php
app/code/core/Mage/Adminhtml/Controller/Action.php
app/code/core/Mage/Adminhtml/Model/LayoutUpdate/Validator.php
app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Filename.php
app/code/core/Mage/Api/Helper/Data.php
app/code/core/Mage/Api/Model/Server/Adapter/Soap.php
app/code/core/Mage/Api/Model/Wsdl/Config.php
app/code/core/Mage/Api/Model/Wsdl/Config/Base.php
app/code/core/Mage/Core/Helper/String.php
app/code/core/Mage/Core/Model/File/Validator/Image.php
app/code/core/Mage/Core/etc/config.xml
app/code/core/Mage/Core/etc/system.xml
app/code/core/Mage/Customer/Model/Customer.php
app/code/core/Mage/Eav/Model/Entity/Attribute/Backend/Serialized.php
app/code/core/Mage/Log/Helper/Data.php
app/code/core/Mage/Rule/Model/Abstract.php
app/code/core/Mage/Sales/Block/Adminhtml/Billing/Agreement/Grid.php
app/code/core/Zend/Form/Decorator/Form.php
app/design/adminhtml/default/default/template/backup/dialogs.phtml
app/design/adminhtml/default/default/template/sales/billing/agreement/view/tab/info.phtml
app/design/adminhtml/default/default/template/xmlconnect/edit/tab/content.phtml
app/design/adminhtml/default/default/template/xmlconnect/edit/tab/design/image_edit.phtml
app/locale/en_US/Mage_Adminhtml.csv
app/locale/en_US/Mage_Customer.csv
js/mage/adminhtml/backup.js
lib/Varien/Filter/FormElementName.php

一些要点:

1)允许的文件扩展名:log,txt,html,csv。签入以下文件

app/Mage.php
app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Filename.php
app/code/core/Mage/Core/etc/system.xml
app/code/core/Mage/Log/Helper/Data.php

2)密码最大长度设置为256个字符,并在app/code/core/Mage/Customer/Model/Customer.php文件中进行验证检查

@@ -74,6 +74,11 @@ class Mage_Customer_Model_Customer extends Mage_Core_Model_Abstract
     const MINIMUM_PASSWORD_LENGTH = 6;

     /**
+     * Maximum Password Length
+     */
+    const MAXIMUM_PASSWORD_LENGTH = 256;
+
+    /**
      * Model event prefix
      *
      * @var string
@@ -876,6 +881,10 @@ class Mage_Customer_Model_Customer extends Mage_Core_Model_Abstract
             $errors[] = Mage::helper('customer')
                 ->__('The minimum password length is %s', self::MINIMUM_PASSWORD_LENGTH);
         }
+        if (strlen($password) && !Zend_Validate::is($password, 'StringLength', array('max' => self::MAXIMUM_PASSWORD_LENGTH))) {
+            $errors[] = Mage::helper('customer')
+                ->__('Please enter a password with at most %s characters.', self::MAXIMUM_PASSWORD_LENGTH);
+        }
         $confirmation = $this->getPasswordConfirmation();
         if ($password != $confirmation) {
             $errors[] = Mage::helper('customer')->__('Please make sure your passwords match.');
@@ -902,7 +911,7 @@ class Mage_Customer_Model_Customer extends Mage_Core_Model_Abstract
     }

     /**
-     * Validate customer attribute values on password reset
+     * Validate customer password on reset
      * @return bool
      */
     public function validateResetPassword()
@@ -916,6 +925,10 @@ class Mage_Customer_Model_Customer extends Mage_Core_Model_Abstract
             $errors[] = Mage::helper('customer')
                 ->__('The minimum password length is %s', self::MINIMUM_PASSWORD_LENGTH);
         }
+        if (!Zend_Validate::is($password, 'StringLength', array('max' => self::MAXIMUM_PASSWORD_LENGTH))) {
+            $errors[] = Mage::helper('customer')
+                ->__('Please enter a password with at most %s characters.', self::MAXIMUM_PASSWORD_LENGTH);
+        }
         $confirmation = $this->getPasswordConfirmation();
         if ($password != $confirmation) {
             $errors[] = Mage::helper('customer')->__('Please make sure your passwords match.');

对于EE Edition添加了其他四个文件

app/code/community/OnTap/Merchandiser/Block/Adminhtml/Catalog/Product/List.php
app/design/adminhtml/default/default/template/merchandiser/smartmerch/tab.phtml
app/design/frontend/rwd/enterprise/template/giftcardaccount/onepage/payment/scripts.phtml
app/design/frontend/enterprise/default/template/giftcardaccount/onepage/payment/scripts.phtml

EE中的一些关键点

在以下文件中添加了条件

app/design/frontend/rwd/enterprise/template/giftcardaccount/onepage/payment/scripts.phtml 
  app/design/frontend/enterprise/default/template/giftcardaccount/onepage/payment/scripts.phtml

请在主题文件中更新以下条件。

if (elements[i].name == 'form_key') 
{
                continue;
 }

欲获得更多信息:

https://magento.com/security/patches/supee-10415 http://devdocs.magento.com/guides/m1x/ce19-ee114/ee1.14_release-notes.html#ee114-11436 http:// devdocs。 magento.com/guides/m1x/ce19-ee114/ce1.9_release-notes.html#ce19-1936


应用SUPEE-10415后,前端和后端均出现404错误,如何解决此问题? magento.stackexchange.com/q/215620/57334
社会保险机构

您能创建一个单独的票证并解释错误日志并添加注释吗?我会为您提供帮助。由于.htaccess出现此问题或在本地覆盖该模块。
Rama Chandran M


20

SUPEE-10415 ...

  1. 解决了以下领域的一些管理面板XSS问题:

    • 产品评论报告
    • 产品标签报告
    • 产品评论添加/编辑界面
    • 计费协议
    • xmlconnect内容编辑器选项卡
    • 序列化规则
  2. 限制可用于系统和异常日志文件的文件扩展名。允许的文件扩展名:.log.txt.html.csv

  3. 对客户帐户密码设置256个字符的上限。这种特殊的变化是荒谬的。不知道他们从哪里得到这个好主意。

除了客户密码长度限制外,这些更改似乎都没有大规模破坏或向后不兼容的更改。


9
256个密码的长度实际上是未修补的Magento中的一个错误,因为数据库密码字段位于customer_entity_varchar.value中,该长度为maxlength =255。如果尝试将长度设置为255以上,则不确定在没有补丁的情况下可能会导致问题。
里奇·奥丁·马修斯

12
没错 customer_entity_varchar.value的列大小确实有限。但是,这不是错误,因为密码未存储在该列中。的咸鱼和散列密码存储在那里。无论原始密码的大小如何,该值将始终具有固定的长度。在此补丁程序之前,输入长度超过255个字符的密码绝对没有问题。
t理查兹

3
我假设密码长度更改与APPSEC-1330有关。magento.com/security/patches/supee-10415
quasiobject '17

7
也许这就是他们的想法,罗布:stackoverflow.com/a/98857/8199523
RickyMage123 '17

1
@ t-richards妙点,您就在那里。您为什么认为他们会这样做,我在想也许对一个长密码进行哈希处理可能会导致CPU使用率方面的DoS问题,当然,较长的密码肯定会占用更多的CPU / PHP内存来进行哈希处理?
里奇·奥丁·马修斯

12

SUPEE 10415需要8788 v2补丁

我遇到了与以前的帖子相同的错误,但似乎已被删除。

a:5:{i:0;s:23:"Unsupported data type N";i:1;s:2942:"#0 /chroot/home/mywebroot/html/lib/Unserialize/Reader/Arr.php(102): Unserialize_Reader_ArrValue->  read('N', ';')
#1 /chroot/home/mywebroot/html/lib/Unserialize/Parser.php(53): Unserialize_Reader_Arr->read('N', ';')
#2 /chroot/home/mywebroot/html/app/code/core/Mage/Core/Helper/UnserializeArray.php(44): Unserialize_Parser->unserialize('a:6:{s:4:"type"...')
#3 /chroot/home/mywebroot/html/app/code/core/Mage/Rule/Model/Abstract.php(179): Mage_Core_Helper_UnserializeArray->unserialize('a:6:{s:4:"type"...')
#4 /chroot/home/mywebroot/html/app/code/core/Mage/Rule/Model/Abstract.php(353): Mage_Rule_Model_Abstract->getConditions()
#5 /chroot/home/mywebroot/html/app/code/core/Mage/SalesRule/Model/Validator.php(216): Mage_Rule_Model_Abstract->validate(Object(   Mage_Sales_Model_Quote_Address))
#6 /chroot/home/mywebroot/html/app/code/core/Mage/SalesRule/Model/Validator.php(242): Mage_SalesRule_Model_Validator->_canProcessRule(Object(  Mage_SalesRule_Model_Rule), Object(Mage_Sales_Model_Quote_Address))
#7 /chroot/home/mywebroot/html/app/code/core/Mage/SalesRule/Model/Quote/Freeshipping.php(74): Mage_SalesRule_Model_Validator->processFreeShipping(Object(  Mage_Sales_Model_Quote_Item))
#8 /chroot/home/mywebroot/html/app/code/core/Mage/Sales/Model/Quote/Address.php(1013): Mage_SalesRule_Model_Quote_Freeshipping->collect(Object(    Mage_Sales_Model_Quote_Address))
#9 /chroot/home/mywebroot/html/app/code/core/Mage/Sales/Model/Quote.php(1331): Mage_Sales_Model_Quote_Address->collectTotals()
#10 /chroot/home/mywebroot/html/app/code/core/Mage/Checkout/Model/Cart.php(458): Mage_Sales_Model_Quote->collectTotals()
#11 /chroot/home/mywebroot/html/app/code/core/Mage/Checkout/controllers/CartController.php(127): Mage_Checkout_Model_Cart->save()
#12 /chroot/home/mywebroot/html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Checkout_CartController->indexAction()
#13 /chroot/home/mywebroot/html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('index')
#14 /chroot/home/mywebroot/html/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(   Mage_Core_Controller_Request_Http))
#15 /chroot/home/mywebroot/html/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#16 /chroot/home/mywebroot/html/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#17 /chroot/home/mywebroot/html/index.php(96): Mage::run('', 'store')
#18 {main}";s:3:"url";s:15:"/checkout/cart/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:7:"default";}

在M 1.8.00 CE上安装新补丁时遇到了以上错误。具体原因似乎是由于拥有8788的v2补丁而导致的,我们针对该补丁中的大多数问题进行了手动修复,但我们错过了反序列化部分。

我没有还原补丁,而是手动进行了修改,现在站点可以正常工作了。

您将在下面找到8788补丁的代码

diff --git lib/Unserialize/Parser.php lib/Unserialize/Parser.php
index 423902a..2c01684 100644
--- lib/Unserialize/Parser.php
+++ lib/Unserialize/Parser.php
@@ -34,6 +34,7 @@ class Unserialize_Parser
     const TYPE_DOUBLE = 'd';
     const TYPE_ARRAY = 'a';
     const TYPE_BOOL = 'b';
+    const TYPE_NULL = 'N';

     const SYMBOL_QUOTE = '"';
     const SYMBOL_SEMICOLON = ';';

diff --git lib/Unserialize/Reader/Arr.php lib/Unserialize/Reader/Arr.php
index caa979e..cd37804 100644
--- lib/Unserialize/Reader/Arr.php
+++ lib/Unserialize/Reader/Arr.php
@@ -101,7 +101,10 @@ class Unserialize_Reader_Arr
         if ($this->_status == self::READING_VALUE) {
             $value = $this->_reader->read($char, $prevChar);
             if (!is_null($value)) {
-                $this->_result[$this->_reader->key] = $value;
+                $this->_result[$this->_reader->key] =
+                    ($value == Unserialize_Reader_Null::NULL_VALUE && $prevChar == Unserialize_Parser::TYPE_NULL)
+                        ? null
+                        : $value;
                 if (count($this->_result) < $this->_length) {
                     $this->_reader = new Unserialize_Reader_ArrKey();
                     $this->_status = self::READING_KEY;

diff --git lib/Unserialize/Reader/ArrValue.php lib/Unserialize/Reader/ArrValue.php
index d2a4937..c6c0221 100644
--- lib/Unserialize/Reader/ArrValue.php
+++ lib/Unserialize/Reader/ArrValue.php
@@ -84,6 +84,10 @@ class Unserialize_Reader_ArrValue
                     $this->_reader = new Unserialize_Reader_Dbl();
                     $this->_status = self::READING_VALUE;
                     break;
+                case Unserialize_Parser::TYPE_NULL:
+                    $this->_reader = new Unserialize_Reader_Null();
+                    $this->_status = self::READING_VALUE;
+                    break;
                 default:
                     throw new Exception('Unsupported data type ' . $char);
             }

diff --git lib/Unserialize/Reader/Null.php lib/Unserialize/Reader/Null.php
new file mode 100644
index 0000000..93c7e0b
--- /dev/null
+++ lib/Unserialize/Reader/Null.php
@@ -0,0 +1,64 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magento.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magento.com for more information.
+ *
+ * @category    Unserialize
+ * @package     Unserialize_Reader_Null
+ * @copyright  Copyright (c) 2006-2016 X.commerce, Inc. and affiliates (http://www.magento.com)
+ * @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
+ */
+
+/**
+ * Class Unserialize_Reader_Null
+ */
+class Unserialize_Reader_Null
+{
+    /**
+     * @var int
+     */
+    protected $_status;
+
+    /**
+     * @var string
+     */
+    protected $_value;
+
+    const NULL_VALUE = 'null';
+
+    const READING_VALUE = 1;
+
+    /**
+     * @param string $char
+     * @param string $prevChar
+     * @return string|null
+     */
+    public function read($char, $prevChar)
+    {
+        if ($prevChar == Unserialize_Parser::SYMBOL_SEMICOLON) {
+            $this->_value = self::NULL_VALUE;
+            $this->_status = self::READING_VALUE;
+            return null;
+        }
+
+        if ($this->_status == self::READING_VALUE && $char == Unserialize_Parser::SYMBOL_SEMICOLON) {
+            return $this->_value;
+        }
+        return null;
+    }
+}

您也可以从这篇文章中了解有关错误的更多信息:新的Unserialize_Parser类在NULL值上引发异常


啊哈!好的一点是,需要8788 V2才能防止该问题!
图标

您能否告诉您,在网站的哪些页面上看到“不支持的数据类型”错误?试图复制。
图标

当产品在购物车中时,我能够在类别页面,产品页面和购物车上触发它。
danmentzer

@danmentzer我如何解决该错误,还原补丁9767 v1 ::错误:justpaste.it/1e9pn
zus

@zus我刚刚看到您的帖子,您是否从粘贴的外观中弄清楚了这一点,所以我敢猜测一下三种不同的错误原因。1.您使用的补丁程序版本错误(这是最不可能的)2.您的补丁程序尚未应用。3.也许您手动修复了其中一些,但补丁不喜欢您的操作方式。抱歉,如果这样做没有帮助
danmentzer

11

我们在此补丁程序中遇到了问题,该站点上的每个页面开始显示目录中的“ 404:找不到页面”错误errors/。经过一番挖掘后,发现它是由中发出的PHP警告引起的Mage_Core_Model_App::init,然后Mage_Core_Model_Store_Exception在补丁的以下几行中引起了:

diff --git app/Mage.php app/Mage.php
index 566027d..165928d 100644
--- app/Mage.php
+++ app/Mage.php
@@ -805,7 +805,12 @@ final class Mage
         static $loggers = array();

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

         try {
             if (!isset($loggers[$file])) {
  1. 在初始化存储之前会发生PHP警告
  2. 该警告将由接收mageCoreErrorHandler(),该调用Mage::log()将消息记录到日志文件中。
  3. Mage::log() 来电 Mage::helper('log')
  4. Mage_Log_Helper_Data::__constructcall Mage::getStoreConfig(),它调用Mage::app()->getStore(),但是存储尚未初始化,并且Mage_Core_Model_Store_Exception引发了
  5. app/Mage.php:647 捕获异常并返回404页面

除了修复警告和/或在检查日志文件扩展名时捕获异常之外,还不确定是否能解决问题。要向Magento报告此事,以了解他们的想法。


您使用什么版本?
图标

1
@图标1.9.3.6。我确实注意到,我们的一些最新项目没有中的__construct()方法Mage_Log_Helper_Data,因此不会受到影响,但是最新的社区版和企业版都可以。
Tomas Gerulaitis

看起来像magento回答了这个问题devdocs.magento.com/guides/m1x/ce19-ee114/…–
图标

magento是否提到他们是否计划在下一个补丁中解决此问题?
图标

1
@Icon我们在admin和前端中都看到了错误,因为问题是在Magento的配置初始化期间发生的。
Tomas Gerulaitis

8

1.已解决:当用户加载管理员时无效的密钥问题

在此补丁中,Magento不再显示“Invalid Secret Key. Please refresh the page.” message when a user loads the Admin

通过更改代码

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

严格限制所有客户密码的长度为MAX 256:

我们已经知道magento 1.x密码的最小长度为6

但在此补丁中,magento将最大长度限制为256。

这种情况下,Magento的做了改变,在功能validate()客户模型类的。所以,如果任何人有覆盖类,并重写那么就应该添加下面的代码上that override class

if (strlen($password) && !Zend_Validate::is($password, 'StringLength', array('max' => self::MAXIMUM_PASSWORD_LENGTH))) {
   $errors[] = Mage::helper('customer')
       ->__('Please enter a password with at most %s characters.', self::MAXIMUM_PASSWORD_LENGTH);
}

添加$this->escapeHtml()和Mage :: helper('core')-> quoteEscape()用于可能XSS攻击的某些文件

如果有人覆盖了这些文件,则应添加以下代码来替换覆盖程序类 1.app/code/core/Mage/Adminhtml/Block/Report/Review/Detail.php

更换

$ this-> _ headerText = Mage :: helper('reports')-> __('%s的评论',$ product-> getName());

$ this-> _ headerText = Mage :: helper('reports')-> __('%s的评论',$ this-> escapeHtml($ product-> getName()));

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

更换

$ this-> _ headerText = Mage :: helper('reports')-> __('标签已提交至%s',$ product-> getName());

$this->_headerText = Mage::helper('reports')->__('Tags submitted to %s', $this->escapeHtml($product->getName()));

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

更换

'text' => '<a href="' . $this->getUrl('*/catalog_product/edit', array('id' => $product->getId())) . '" onclick="this.target=\'blank\'">' . $product->getName() . '</a>'

'text' => '<a href="' . $this->getUrl('*/catalog_product/edit', array('id' => $product->getId())) . '" onclick="this.target=\'blank\'">' . $this->escapeHtml($product->getName()) . '</a>'

  1. 销售订单视图结算同意:app / design / adminhtml / default / default / template / sales / billing / agreement / view / tab / info.phtml

更换

<?php echo $this->getCustomerEmail() ?>

<?php echo $this->escapeHtml($this->getCustomerEmail()) ?>

  1. Mage :: helper('core')-> quoteEscape开发的app / design / adminhtml / default / default / template / xmlconnect / edit / tab / content.phtml

更换

this.pageOptions += '<option value="<?php echo $helper->jsQuoteEscape($page['value']) ?>"><?php echo $helper->jsQuoteEscape($page['label']) ?></option>';

$this.pageOptions += '<option value="<?php echo $helper->jsQuoteEscape($page['value']) ?>"><?php echo $helper->quoteEscape($page['label']) ?></option>';

  1. 通过Mage :: helper('core')-> quoteEscape开发的app / design / adminhtml / default / default / template / xmlconnect / edit / tab / design / image_edit.phtml

更换

<option value="<?php echo $page['value']; ?>"><?php echo $page['label']; ?></option>

<option value="<?php echo $page['value']; ?>"><?php echo Mage::helper('core')->quoteEscape($page['label']); ?></option>


4
谢谢@Amit,我错过了ans :)中的“ Resolved:Invalid Secret Key issue”。+1
Rama Chandran M

1
欢迎您:)...您在这个问题上做得很好
Amit Bera

7

如果您已经应用了SUPEE-10358 ^,或者app/code/core/Mage/Adminhtml/Controller/Action.php针对“ 无效密钥 ”问题进行了手动修补,则需要从修补文件中手动删除该部分:

diff --git app/code/core/Mage/Adminhtml/Controller/Action.php app/code/core/Mage/Adminhtml/Controller/Action.php
index 2a8e63f..f2ee208 100644
--- app/code/core/Mage/Adminhtml/Controller/Action.php
+++ app/code/core/Mage/Adminhtml/Controller/Action.php
@@ -186,7 +186,7 @@ class Mage_Adminhtml_Controller_Action extends Mage_Core_Controller_Varien_Actio
                 'message' => $_keyErrorMsg
             )));
         } else {
-                if ($_keyErrorMsg != ''){
+                if (!$_isValidFormKey){
                 Mage::getSingleton('adminhtml/session')->addError($_keyErrorMsg);
             }
             $this->_redirect( Mage::getSingleton('admin/session')->getUser()->getStartupPageUrl() );

另外,如果您已经修复了“ new-pawwsord ”错字(在SUPEE-10266中引入), app/design/adminhtml/default/default/template/backup/dialogs.phtml则也可以从补丁中删除该部分:

diff --git app/design/adminhtml/default/default/template/backup/dialogs.phtml app/design/adminhtml/default/default/template/backup/dialogs.phtml
index c5a3f82..2ff57cc 100644
--- app/design/adminhtml/default/default/template/backup/dialogs.phtml
+++ app/design/adminhtml/default/default/template/backup/dialogs.phtml
@@ -158,7 +158,7 @@
                             <td class="value">
                                 <!-- This is a dummy hidden field to trick firefox from auto filling the password -->
                                 <input type="password" class="input-text no-display" name="dummy" id="dummy" />

-                                    <input type="password" name="ftp_pass" id="ftp_pass" autocomplete="new-pawwsord">
+                                    <input type="password" name="ftp_pass" id="ftp_pass" autocomplete="new-password">
                             </td>
                         </tr>
                         <tr>

^ MageSupport提供了SUPEE-10358,以回应有关InvalidSecretKey问题的EE支持通知单


5

问题:修补程序在香草1.9.1.1上不起作用

编辑1:在下面添加了修复程序。

编辑2:不再需要我的修复程序,Magento提供了SUPEE-10497来解决此问题。

问题:

# file: PATCH_SUPEE-10415_CE_1.9.1.1_v1-2017-11-27-05-47-08.sh
Checking if patch can be applied/reverted successfully...
ERROR: Patch can't be applied/reverted successfully.

checking file app/Mage.php
checking file app/code/core/Mage/Adminhtml/Block/Report/Review/Detail.php
checking file app/code/core/Mage/Adminhtml/Block/Report/Tag/Product/Detail.php
checking file app/code/core/Mage/Adminhtml/Block/Review/Add.php
checking file app/code/core/Mage/Adminhtml/Block/Review/Edit/Form.php
checking file app/code/core/Mage/Adminhtml/Controller/Action.php
checking file app/code/core/Mage/Adminhtml/Model/LayoutUpdate/Validator.php
checking file app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Filename.php
checking file app/code/core/Mage/Api/Helper/Data.php
checking file app/code/core/Mage/Api/Model/Server/Adapter/Soap.php
checking file app/code/core/Mage/Api/Model/Wsdl/Config.php
checking file app/code/core/Mage/Api/Model/Wsdl/Config/Base.php
checking file app/code/core/Mage/Core/Helper/String.php
checking file app/code/core/Mage/Core/Model/File/Validator/Image.php
Hunk #1 FAILED at 90.
1 out of 1 hunk FAILED
checking file app/code/core/Mage/Core/etc/config.xml
checking file app/code/core/Mage/Core/etc/system.xml
Hunk #1 succeeded at 651 (offset 1 line).
Hunk #2 succeeded at 661 (offset 1 line).
checking file app/code/core/Mage/Customer/Model/Customer.php
checking file app/code/core/Mage/Eav/Model/Entity/Attribute/Backend/Serialized.php
checking file app/code/core/Mage/Log/Helper/Data.php
checking file app/code/core/Mage/Rule/Model/Abstract.php
checking file app/code/core/Mage/Sales/Block/Adminhtml/Billing/Agreement/Grid.php
checking file app/code/core/Zend/Form/Decorator/Form.php
checking file app/design/adminhtml/default/default/template/backup/dialogs.phtml
checking file app/design/adminhtml/default/default/template/sales/billing/agreement/view/tab/info.phtml
checking file app/design/adminhtml/default/default/template/xmlconnect/edit/tab/content.phtml
checking file app/design/adminhtml/default/default/template/xmlconnect/edit/tab/design/image_edit.phtml
checking file app/locale/en_US/Mage_Adminhtml.csv
checking file app/locale/en_US/Mage_Customer.csv
checking file js/mage/adminhtml/backup.js
checking file lib/Varien/Filter/FormElementName.php

香草Magento 1.9.1.1是从https://github.com/OpenMage/magento-mirror/archive/1.9.1.1.tar.gz下载的

先前在此Magento 1.9.1.1上应用的补丁:

2017-11-29 07:37:12 UTC | SUPEE-5994 | CE_1.6.0.0 | v1 | _ | n/a | SUPEE-5994_CE_1.6.0.0_v1.patch
2017-11-29 07:37:12 UTC | SUPEE-6237 | EE_1.14.2.0 | v1 | 8b216c42e2e5d2cb5d8e500fcb6690abede9df52 | Fri Jun 12 13:39:59 2015 +0300 | v1.14.2.0..HEAD
2017-11-29 07:37:12 UTC | SUPEE-6285 | CE_1.9.1.1 | v2 | 7226d88b1eeb07a5fbc4e62be189a5219457cc14 | Mon Jun 22 16:32:26 2015 +0300 | 202596e441..7226d88b1e
2017-11-29 07:37:12 UTC | SUPEE-6482 | CE_1.9.2.0 | v1 |  | Tue Jul 14 14:17:04 2015 +0300 |
2017-11-29 07:37:12 UTC | SUPEE-6788 | CE_1.9.1.1 | v1 | 2349a68440e870cd68dfa81fb982f3b7a42cd099 | Fri Oct 23 14:49:16 2015 +0300 | b240663
2017-11-29 07:37:12 UTC | SUPEE-7405-CE-1-9-1-1 | CE_1.9.1.1 | v1 | f1c57f70de3fc2bea64bbe3ddf3bdf076b750f8e | Tue Jan 19 15:29:35 2016 +0200 | 2349a68440..f1c57f70de
2017-11-29 07:37:12 UTC | SUPEE-7405 | CE_1.9.1.1 | v1.1 | 38d673b4d2b132c6df53becc9d92346aa5d9627e | Fri Feb 5 13:28:39 2016 +0200 | f1c57f70de3fc2bea64bbe3ddf3bdf076b750f8e..38d673b4d2b132c6df53becc9d92346aa5d9627e
2017-11-29 07:37:12 UTC | SUPEE-7616 | CE_1.9.2.2-CE_1.8.0.0 | v1 | 1609c0d0be86473d357346fa51f93c12b365d7a1 | Tue Dec 8 12:53:31 2015 +0200 | e1fc3c59c9587427b8a9c88655715f27afbfe970..1609c0d0be86473d357346fa51f93c12b365d7a1
2017-11-29 07:37:12 UTC | SUPEE-8167 | EE_1.14.2.0 | v1 | 87bb97f9b0b2871f842b7faabf667a81806f937e | Thu Apr 27 13:31:21 2017 +0300 | 6010eb82..87bb97f9b
2017-11-29 07:37:12 UTC | SUPEE-8788 | CE_1.9.1.1 | v2 | 8d9fad1daf5131de3430ef09b0816d3d133c8412 | Mon Sep 26 14:06:18 2016 +0300 | 38d673b4d2..8d9fad1daf
2017-11-29 07:37:12 UTC | SUPEE-8967 | EE_1.13.1.0 | v1 | 1fa53e9533f6f3a16f24d9b64dabef0ab7f965d7 | Thu Aug 18 16:32:48 2016 +0300 | 97d160644..1fa53e9533
2017-11-29 07:37:13 UTC | SUPEE-9652 | EE_1.14.3.1 | v1 | 4038f0785d828794083f53f10c01aaa6af403523 | Tue Jan 24 15:03:12 2017 +0200 | 9586981e6ca8b255014b242d50b68b88525b0754..4038f0785d828794083f53f10c01aaa6af403523
2017-11-29 07:37:13 UTC | PATCH_SUPEE-9767_CE_1.9.3.0_v2 | CE_1.9.3.0 | v2 | 6566db274beaeb9bcdb56a62e02cc2da532e618c | Thu Jun 22 04:30:03 2017 +0300 | v1.14.3.3..HEAD
2017-11-29 07:37:13 UTC | SUPEE-10336_v1.14.2.4 | CE_1.9.2.4 | v1 | 721708ecf41f0ee745b8f441a4bfe56471b493a7 | Fri Sep 8 17:55:44 2017 +0300 | cc0d87..721708e
2017-11-29 07:37:13 UTC | SUPEE-10266-CE-1.9.1.1 | CE_1.9.1.1 | v1 | f66c6bcd3c16c5ca934823e6a91b5696698e497c | Fri Sep 1 12:15:53 2017 +0300 | 8d9fad1daf5131de3430ef09b0816d3d133c8412..HEAD

适用于1.9.1.1的SUPEE-10415修补程序的官方修补程序:

  • 如果您安装了SUPEE-10266
    使用以下方法还原它: ./PATCH_SUPEE-10266_CE_1.9.1.1_v1-2017-09-15-04-59-56.sh --revert
  • 如果已安装SUPEE-10415:请
    使用还原 ./PATCH_SUPEE-10415_CE_1.9.1.1_v1-2017-11-27-05-47-08.sh --revert
  • 现在申请SUPEE-10497

1.9.1.1的SUPEE-10415修补程序的手动修复[不建议使用]:

编辑文件PATCH_SUPEE-10415_CE_1.9.1.1_v1-2017-11-27-05-47-08.sh,替换445- 447

旧:

         $fileInfo = getimagesize($filePath);
         if (is_array($fileInfo) and isset($fileInfo[2])) {
             if ($this->isImageType($fileInfo[2])) {

新:

         list($imageWidth, $imageHeight, $fileType) = getimagesize($filePath);
         if ($fileType) {
             if ($this->isImageType($fileType)) {

我也在经历这个。似乎是一个问题app/code/core/Mage/Core/Model/File/Validator/Image.php。SUPEE-10415补丁似乎没有考虑SUPEE-9767补丁(v1或v2)所做的修改
wr125 '17

1
修复添加到我的答案的底部。
Jeroen Vermeulen-MageHost

1
我不同意 我们从github.com/OpenMage/magento-mirror/archive/1.9.2.2.tar.gz进行了香草安装,并能够按以下顺序应用补丁:SUPEE-7405-CE-1-9-2-2 | CE_1.9.2.2 | v1,SUPEE-7405 | CE_1.9.2.2 | v1.1,SUPEE-7616 | CE_1.9.2.2-CE_1.8.0.0 | v1,SUPEE-8167 | EE_1.14.2.0 | v1,SUPEE-8788 | CE_1.9.2.2 | v2,SUPEE-8967 | EE_1.13.1.0 | v1,SUPEE-9652 | EE_1.14.3.1 | v1,PATCH_SUPEE-9767_CE_1.9.3.0_v2 | CE_1.9.3.0 | v2,SUPEE-10336_v1.14.2.4 | CE_1.9.2.4 | v1,SUPEE-10266-CE-1.9.2.4 | CE_1.9.2.4 | v1,SUPEE-10415-ce-1.9.2.2 | CE_1.9.2.2 | v1
Jeroen Vermeulen-MageHost

1
您需要应用所有以前的补丁,请参阅我以前的评论。我测试了
Jeroen Vermeulen-MageHost

4
请改用SUPEE-10497,它是最近发布的,用于在1.9.1.1上解决此问题。请阅读发行说明,因为此补丁要求在安装前删除SUPEE-10266。
Piotr Kaminski

3

这是完整的变更日志,以及我对变更日志的了解

以及哪些文件受什么原因影响列出如下

逃逸HTML变更

文件

app/code/core/Mage/Adminhtml/Block/Report/Review/Detail.php
app/code/core/Mage/Adminhtml/Block/Report/Tag/Product/Detail.php
app/code/core/Mage/Adminhtml/Block/Review/Add.php
app/code/core/Mage/Adminhtml/Block/Review/Edit/Form.php
app/code/core/Mage/Sales/Block/Adminhtml/Billing/Agreement/Grid.php
app/design/adminhtml/default/default/template/sales/billing/agreement/view/tab/info.phtml
app/design/adminhtml/default/default/template/xmlconnect/edit/tab/content.phtml
app/design/adminhtml/default/default/template/xmlconnect/edit/tab/design/image_edit.phtml
js/mage/adminhtml/backup.js

添加DS而不是'/'

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

添加了新文件

app/code/core/Zend/Form/Decorator/Form.php
lib/Varien/Filter/FormElementName.php

完成变更文件

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

 class Mage_Adminhtml_Model_System_Config_Backend_Filename extends Mage_Core_Model_Config_Data
 {
+
+ /**
+ * Config path for system log file.
+ */
+ const DEV_LOG_FILE_PATH = 'dev/log/file';
+
+ /**
+ * Config path for exception log file.
+ */
+ const DEV_LOG_EXCEPTION_FILE_PATH = 'dev/log/exception_file';
+
+ /**
+ * Processing object before save data
+ *
+ * @return Mage_Adminhtml_Model_System_Config_Backend_Filename
+ * @throws Mage_Core_Exception
+ */
 protected function _beforeSave()
 {
- $value = $this->getValue();
- $value = basename($value);
+ $value = $this->getValue();
+ $configPath = $this->getPath();
+ $value = basename($value);
+
+ // if dev/log setting, validate log file extension.
+ if ($configPath == self::DEV_LOG_FILE_PATH || $configPath == self::DEV_LOG_EXCEPTION_FILE_PATH) {
+ if (!Mage::helper('log')->isLogFileExtensionValid($value)) {
+ throw Mage::exception('Mage_Core', Mage::helper('adminhtml')->__
+ ('Invalid file extension used for log file. Allowed file extensions: log, txt, html, csv'));
+ }
+ }
+
     $this->setValue($value);
     return $this;
 }

添加了方法getCacheId()和getServiceUrl()

app/code/core/Mage/Api/Helper/Data.php

添加了方法unserialize()

app/code/core/Mage/Core/Helper/String.php

使用在app / code / core / Mage / Api / Helper / Data.php中创建的getServiceUrl()方法

app/code/core/Mage/Api/Model/Server/Adapter/Soap.php
app/code/core/Mage/Api/Model/Wsdl/Config/Base.php

使用在app / code / core / Mage / Api / Helper / Data.php中创建的getCacheId()方法

app/code/core/Mage/Api/Model/Wsdl/Config.php

使用上面unserialize()在app / code / core / Mage / Core / Helper / String.php中创建的方法

app/code/core/Mage/Eav/Model/Entity/Attribute/Backend/Serialized.php
app/code/core/Mage/Rule/Model/Abstract.php

评论变更

app/code/core/Mage/Core/Model/File/Validator/Image.php
app/code/core/Mage/Core/etc/system.xml

已添加评论

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

增加了最大密码长度

app/code/core/Mage/Customer/Model/Customer.php

添加了允许文件扩展名 // $ _ allowedFileExtensions = array('log','txt','html','csv');

app/code/core/Mage/Log/Helper/Data.php

不知道有什么变化

app/design/adminhtml/default/default/template/backup/dialogs.phtml

问题清单

SUPEE-10415防止篮子控制

在magento中的贝宝中获取错误代码#10415


1

在Magento EE 1.13.0.2上尝试进行此操作,如果安装了SUPEE-6482,则此补丁似乎无法正常运行。

Checking patch app/code/core/Mage/Api/Model/Server/Adapter/Soap.php...
error: while searching for:
            ->setUseSession(false);

        $wsdlUrl = $params !== null
            ? $urlModel->getUrl('*/*/*', array('_current' => true, '_query' => $params))
            : $urlModel->getUrl('*/*/*');

        if( $withAuth ) {
            $phpAuthUser = $this->getController()->getRequest()->getServer('PHP_AUTH_USER', false);

error: patch failed: app/code/core/Mage/Api/Model/Server/Adapter/Soap.php:205

SUPEE-6482将线路更改$phpAuthUser

$phpAuthUser = rawurlencode($this->getController()->getRequest()->getServer('PHP_AUTH_USER', false));

不仅$phpAuthUser行距不同,之前的行距->setUseSession(false);也不正确
DanCarlyon
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.