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


28

Magento发布了针对M1的新安全补丁,以及针对M1和M2的更新。

应用此补丁/升级时,您需要注意哪些常见问题?

Magento 1

https://magento.com/security/patches/supee-11155

Magento 2

这应该是2.1系列中的最后一个版本,该版本将于本月底达到其终止销售状态。


1
让任何人测试了这意味着什么:“在Magento更新之后,将无法再访问以访客身份登录的客户创建的报价。第三方结帐扩展程序和封闭的安全案例将无法安全运行或无法在所有。” ?
Kalvin Klien

我对固定错误PRODSECBUG-2330
Richie Frame

Answers:


11

该补丁与PHP 7.2支持补丁不兼容。移除线1711至1761允许应用补丁。此修补程序试图修补由7.2支持修补程序删除的文件。拆除这些管线应该是安全的。


1
您使用哪个M1版本(或下载哪个补丁版本)?我们使用的是自定义补丁1.7,因此我们需要仔细研究
Laura

1
@Laura我在1.9.2
Michael Thessel

1
补丁的新版本v4可以处理PHP 7.2。
劳拉

11

在1.7.0.2 CE上安装了所有以前的修补程序时出错(请参见下文)。

编辑:问题(#1)是由于缺少文件引起的-app / code / core / Mage / Catalog / Model / Product / Option / Type / File.php.orig

通过从补丁脚本中删除第874-1702行(引用File.php.orig)解决了问题(#1)。

问题(#2)是由于补丁和文件格式不正确引起的-js / tiny_mce / plugins / media / js / media.js

通过为补丁文件和media.js文件运行dos2unix命令解决了问题(#2)

解决上述两个问题后,补丁安装成功。

正在检查补丁是否可以成功应用/恢复...

错误:无法成功应用/还原补丁。

补丁文件app / Mage.php补丁文件app / code / core / Mage / Admin / Model / Block.php补丁文件app / code / core / Mage / Admin / Model / User.php补丁文件app / code / core / Mage /AdminNotification/etc/system.xml修补文件app / code / core / Mage / Adminhtml / Block / Api / Role / Grid / User.php修补文件app / code / core / Mage / Adminhtml / Block / Catalog / Product / Edit /Tab/Super/Config.php修补文件app / code / core / Mage / Adminhtml / Block / Newsletter / Queue / Preview.php修补文件app / code / core / Mage / Adminhtml / Block / Newsletter / Template / Preview.php修补文件app / code / core / Mage / Adminhtml / Block / Permissions / Role / Grid / User.php修补文件app / code / core / Mage / Adminhtml / Block / Sales / Creditmemo / Grid.php修补文件app / code / core / Mage / Adminhtml / Block / Sales / Invoice / Grid.php修补文件app / code / core / Mage / Adminhtml / Block / Sales / Order / Create / Header。php补丁文件app / code / core / Mage / Adminhtml / Block / Sales / Order / Creditmemo / Create.php补丁文件app / code / core / Mage / Adminhtml / Block / Sales / Order / Grid.php补丁文件app / code /core/Mage/Adminhtml/Block/Sales/Order/Invoice/Create.php修补文件app / code / core / Mage / Adminhtml / Block / Sales / Order / Shipment / Create.php修补文件app / code / core / Mage /Adminhtml/Block/Sales/Order/View.php修补文件app / code / core / Mage / Adminhtml / Block / Sales / Shipment / Grid.php修补文件app / code / core / Mage / Adminhtml / Block / Sales / Transactions /Grid.php补丁文件app / code / core / Mage / Adminhtml / Block / System / Email / Template / Preview.php补丁文件app / code / core / Mage / Adminhtml / Block / Template.php补丁文件app / code / core / Mage / Adminhtml / Block / Widget / Grid / Column / Renderer / Abstract。php补丁文件app / code / core / Mage / Adminhtml / Model / LayoutUpdate / Validator.php补丁文件app / code / core / Mage / Adminhtml / Model / System / Config / Backend / Baseurl.php补丁文件app / code / core /Mage/Adminhtml/Model/System/Config/Backend/Locale.php补丁文件app / code / core / Mage / Adminhtml / Model / System / Config / Backend / Serialized / Array.php补丁文件app / code / core / Mage /Adminhtml/controllers/Catalog/Product/AttributeController.php修补文件app / code / core / Mage / Adminhtml / controllers / Catalog / Product / ReviewController.php修补文件app / code / core / Mage / Adminhtml / controllers / Catalog / ProductController .php补丁文件app / code / core / Mage / Adminhtml / controllers / Checkout / AgreementController.php补丁文件app / code / core / Mage / Adminhtml / controllers / Newsletter / TemplateController。php补丁文件app / code / core / Mage / Adminhtml / controllers / Promo / CatalogController.php补丁文件app / code / core / Mage / Adminhtml / controllers / Promo / QuoteController.php补丁文件app / code / core / Mage / Adminhtml /controllers/Sales/Order/CreateController.php修补文件app / code / core / Mage / Adminhtml / controllers / SitemapController.php修补文件app / code / core / Mage / Adminhtml / controllers / System / Email / TemplateController.php修补文件app / code / core / Mage / Catalog / Helper / Product.php下一个php补丁文件app / code / core / Mage / Adminhtml / controllers / System / Email / TemplateController.php补丁文件app / code / core / Mage / Catalog / Helper / Product.php下一个php补丁文件app / code / core / Mage / Adminhtml / controllers / System / Email / TemplateController.php补丁文件app / code / core / Mage / Catalog / Helper / Product.php下一个

补丁程序将删除文件app / code / core / Mage / Catalog / Model / Product / Option / Type / File.php.orig,该文件不存在!
假设-R?[n]
仍要申请吗?[n]正在
跳过补丁。1个大块中有1个忽略了修补文件

app / code / core / Mage / Catalog / controllers / Product / CompareController.php修补文件app / code / core / Mage / Checkout / Model / Session.php修补文件app / code / core / Mage / Checkout / controllers / OnepageController。 php补丁文件app / code / core / Mage / Cms / Helper / Data.php补丁文件app / code / core / Mage / Cms / Model / Wysiwyg / Config.php补丁文件app / code / core / Mage / Cms / etc /config.xml补丁文件app / code / core / Mage / Compiler / Model / Process.php补丁文件app / code / core / Mage / Core / Helper / Abstract.php补丁文件app / code / core / Mage / Core / Helper / Data.php补丁文件app / code / core / Mage / Core / Model / Design / Package.php补丁文件app / code / core / Mage / Core / Model / Email / Template / Filter.php补丁文件app / code /core/Mage/Core/Model/File/Validator/AvailablePath.php修补文件app / code / core / Mage / Core / Model / Observer。php补丁文件app / code / core / Mage / Core / etc / config.xml补丁文件app / code / core / Mage / Core / functions.php补丁文件app / code / core / Mage / CurrencySymbol / Model / System / Currencysymbol .php补丁文件app / code / core / Mage / Downloadable / controllers / DownloadController.php补丁文件app / code / core / Mage / SalesRule / Model / Coupon / Massgenerator.php补丁文件app / code / core / Mage / SalesRule / Model / Resource / Report / Rule / Createdat.php修补文件app / code / core / Mage / Sendfriend / etc / config.xml修补文件app / code / core / Mage / Sendfriend / etc / system.xml修补文件app / design /adminhtml/default/default/template/catalog/product/composite/fieldset/configurable.phtml修补文件app / design / adminhtml / default / default / template / catalog / product / helper / gallery。phtml修补文件app / design / adminhtml / default / default / template / catalog / product / tab / inventory.phtml修补文件app / design / adminhtml / default / default / template / currencysymbol / grid.phtml修补文件app / design / adminhtml /default/default/template/customer/tab/addresses.phtml修补文件app / design / adminhtml / default / default / template / customer / tab / view.phtml修补文件app / design / adminhtml / default / default / template / notification /window.phtml修补文件app / design / adminhtml / default / default / template / sales / order / create / data.phtml修补文件app / design / adminhtml / default / default / template / sales / order / view / info.phtml修补文件app / design / adminhtml / default / default / template / system / currency / rate / matrix.phtml修补文件app / locale / en_US / Mage_Adminhtml.csv修补文件app / locale / en_US / Mage_Core。csv修补文件app / locale / en_US / Mage_Sales.csv修补文件app / locale / en_US / Mage_Sitemap.csv修补文件js / mage / adminhtml / wysiwyg / tiny_mce / setup.js修补文件js / tiny_mce / plugins / media / js / media.js

Hunk#1 FAILED at 434. 1个大块FAILED中的1个-将拒绝保存到文件js / tiny_mce / plugins / media / js / media.js.rej修补文件

js / varien / js.js补丁文件lib / phpseclib / PHP / Compat / Function / array_fill.php补丁文件lib / phpseclib / PHP / Compat / Function / bcpowmod.php补丁文件lib / phpseclib / PHP / Compat / Function / str_split .php文件


谢谢。这两个问题也是我面临的1.7.0.2和PATCH_SUPEE-11155_CE_1.7.0.2_v3-2019-06-18-08-07-47.sh
Anthony

当场发布1.7.0.2版。
shaune

9

Magento 1.9.1.0。

补丁已成功应用。

将产品添加到购物车然后登录后,购物车再次为空。

我认为以前没有这个问题,而且似乎已经对 app/code/core/Mage/Checkout/Model/Session.php

更新:

我已经调试了一下。

当我还原它的修补版本时,app/code/core/Mage/Checkout/Model/Session.php对我来说再次起作用。所以我很确定这与补丁有关。

我最初以为是结合使用的,$quote->unsetData();但是我的测试尚无定论,因此无论如何也无法删除它。

由于我现在正在休假,因此我有有限的时间进行进一步调查。

更新2:

最新的修补程序(SUPEE-11219)似乎可以解决此问题。包含对app / code / core / Mage / Checkout / Model / Session.php的更改。


Magento在发行说明中有一条注释:“在Magento更新之后,将无法再访问由以访客身份登录的客户创建的报价。第三方结帐扩展程序和封闭的安全案例将无法安全运行或完全无法运行。 ”。我现在要他们澄清。 devdocs.magento.com/guides/m1x/ce19-ee114/...
卡尔文-克莱恩

@Claudio大家好,您找到该问题的任何解决方案/答案了吗?我目前正面临着同样的情况:添加到购物车->结帐->创建帐户->返回首页,购物车为空,但已登录...谢谢。
Antoine Kociuba

嘿@AntoineKociuba,很遗憾,不是。老实说,我并没有真正寻找解决方案。
克劳迪奥

最新的修补程序(SUPEE-11219)似乎可以解决此问题。包含对app / code / core / Mage / Checkout / Model / Session.php的更改。
克劳迪奥

7

在M1上,特别是1.9.2.1 w /应用了所有以前的补丁。我收到以下错误:

Hunk #1 FAILED at 483.
1 out of 1 hunk FAILED -- saving rejects to file js/tiny_mce/plugins/media/js/media.js.rej

当我重新应用补丁文件时,从补丁文件中删除有关该文件的行并手动应用所做的更改对我来说是有效的。

当我查看js / tiny_mce / plugins / media / js / media.js文件与OpenMage Mirror中的文件之间的区别时,它们是相同的文件。


该文件还没有被任何补丁或手动更新所触及。这似乎是补丁程序中的问题吗?从它的名称来看,它似乎已经发行了1-3个版本。
Kalvin Klien

在1.9.1.1上应用了所有以前的补丁程序时出现了此问题。用OpenMage Mirror中的文件替换js / tiny_mce / plugins / media / js / media.js对我有用。尽管文件的内容相同,但我认为现有文件的行尾由于某些原因是错误的。
wr125

5
在应用补丁之前在补丁上运行dos2unix,为我们解决了该问题。之前按照上述要求失败,之后成功完成。
约瑟克

在补丁文件上运行dos2unix可以在1.9.2.3上为我解决此问题,但是在1.9.2.1上我没有发现它是必需的(出于好奇,我尝试了此操作,这导致补丁失败)。
戴夫·赫伯特

5

1.9.1.0,成功应用补丁后,登录admin时出现如下错误

Fatal error: Call to undefined function random_int() in /app/code/core/Mage/Core/Helper/Data.php on line 257 

怎么修?


从1.9.4.1升级到1.9.4.2之后,我们也会遇到相同的问题。
joesk

我得到了1.9.4.1同样的问题与11155.
seanbreeden

7
问题原来是对app / code / core / Mage / Core / functions.php的覆盖。确保没有人覆盖此文件,否则补丁将因调用未定义函数错误而失败。查看“ app / code / local / Mage / Core / functions.php”
seanbreeden

1
你说的很对。
六月

1
非常感谢@seanbreeden!
毛里西奥帕兹

3

在M1,1.9.1.0上,应用了所有先前的补丁程序,我收到许多错误:

checking file app/Mage.php 
Hunk #1 FAILED at 813. 
1 out of 1 hunk FAILED

checking file app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config.php
Hunk #1 FAILED at 155.
1 out of 1 hunk FAILED

checking file app/code/core/Mage/Adminhtml/Model/LayoutUpdate/Validator.php
Hunk #1 FAILED at 180.
1 out of 1 hunk FAILED

checking file app/code/core/Mage/Cms/Helper/Data.php
Hunk #1 FAILED at 37.
Hunk #2 succeeded at 58 with fuzz 2 (offset -16 lines).
1 out of 2 hunks FAILED

checking file app/design/adminhtml/default/default/template/catalog/product/helper/gallery.phtml
Hunk #1 FAILED at 59.
1 out of 1 hunk FAILED

checking file js/tiny_mce/plugins/media/js/media.js
Hunk #1 FAILED at 483 (different line endings).
1 out of 1 hunk FAILED

看一下补丁文件中的代码本身,似乎与我安装的PHP根本不匹配。

也许我错过了途中某个地方的补丁?


我认为您可能跳过了补丁。检查您的/app/etc/applied.patches.list
Kalvin Klien

请参阅:magento.stackexchange.com/a/280148/202,关于gallery.phtml上59号Hunk#1失败-您的代码也可能有所更改吗?
ProxiBlue

@Matt您是否确定错过了哪个补丁?
卢比

3

Magento 1.7.0.2

我越来越:

Hunk #1 succeeded at 113 with fuzz 2 (offset 4 lines).
checking file js/tiny_mce/plugins/media/js/media.js
checking file js/varien/js.js

Hunk #1 succeeded at 707 (offset 5 lines).
checking file lib/phpseclib/PHP/Compat/Function/array_fill.php
checking file lib/phpseclib/PHP/Compat/Function/bcpowmod.php
checking file lib/phpseclib/PHP/Compat/Function/str_split.php

这些来自PHP 7.2补丁吗?

更新:看起来那些文件实际上没问题,只是空白偏移量。

问题文件是:

checking file app/code/core/Mage/Catalog/Model/Product/Option/Type/File.php.orig

我认为这是某个修补程序遗留下来的某个文件。新补丁只会删除该文件。我在该目录中没有它,因此出现了错误。

更新:Magento 1.7.0.2上的受影响文件列表

app/Mage.php
app/code/core/Mage/Admin/Model/Block.php
app/code/core/Mage/Admin/Model/User.php
app/code/core/Mage/AdminNotification/etc/system.xml
app/code/core/Mage/Adminhtml/Block/Api/Role/Grid/User.php
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config.php
app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Preview.php
app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Preview.php
app/code/core/Mage/Adminhtml/Block/Permissions/Role/Grid/User.php
app/code/core/Mage/Adminhtml/Block/Sales/Creditmemo/Grid.php
app/code/core/Mage/Adminhtml/Block/Sales/Invoice/Grid.php
app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Header.php
app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/Create.php
app/code/core/Mage/Adminhtml/Block/Sales/Order/Grid.php
app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/Create.php
app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Create.php
app/code/core/Mage/Adminhtml/Block/Sales/Order/View.php
app/code/core/Mage/Adminhtml/Block/Sales/Shipment/Grid.php
app/code/core/Mage/Adminhtml/Block/Sales/Transactions/Grid.php
app/code/core/Mage/Adminhtml/Block/System/Email/Template/Preview.php
app/code/core/Mage/Adminhtml/Block/Template.php
app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Abstract.php
app/code/core/Mage/Adminhtml/Model/LayoutUpdate/Validator.php
app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Baseurl.php
app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Locale.php
app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Serialized/Array.php
app/code/core/Mage/Adminhtml/controllers/Catalog/Product/AttributeController.php
app/code/core/Mage/Adminhtml/controllers/Catalog/Product/ReviewController.php
app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php
app/code/core/Mage/Adminhtml/controllers/Checkout/AgreementController.php
app/code/core/Mage/Adminhtml/controllers/Newsletter/TemplateController.php
app/code/core/Mage/Adminhtml/controllers/Promo/CatalogController.php
app/code/core/Mage/Adminhtml/controllers/Promo/QuoteController.php
app/code/core/Mage/Adminhtml/controllers/Sales/Order/CreateController.php
app/code/core/Mage/Adminhtml/controllers/SitemapController.php
app/code/core/Mage/Adminhtml/controllers/System/Email/TemplateController.php
app/code/core/Mage/Catalog/Helper/Product.php
app/code/core/Mage/Catalog/controllers/Product/CompareController.php
app/code/core/Mage/Checkout/Model/Session.php
app/code/core/Mage/Checkout/controllers/OnepageController.php
app/code/core/Mage/Cms/Helper/Data.php
app/code/core/Mage/Cms/Model/Wysiwyg/Config.php
app/code/core/Mage/Cms/etc/config.xml
app/code/core/Mage/Compiler/Model/Process.php
app/code/core/Mage/Core/Helper/Abstract.php
app/code/core/Mage/Core/Helper/Data.php
app/code/core/Mage/Core/Model/Design/Package.php
app/code/core/Mage/Core/Model/Email/Template/Filter.php
app/code/core/Mage/Core/Model/File/Validator/AvailablePath.php
app/code/core/Mage/Core/Model/Observer.php
app/code/core/Mage/Core/etc/config.xml
app/code/core/Mage/Core/functions.php
app/code/core/Mage/CurrencySymbol/Model/System/Currencysymbol.php
app/code/core/Mage/Downloadable/controllers/DownloadController.php
app/code/core/Mage/SalesRule/Model/Coupon/Massgenerator.php
app/code/core/Mage/SalesRule/Model/Resource/Report/Rule/Createdat.php
app/code/core/Mage/Sendfriend/etc/config.xml
app/code/core/Mage/Sendfriend/etc/system.xml
app/design/adminhtml/default/default/template/catalog/product/composite/fieldset/configurable.phtml
app/design/adminhtml/default/default/template/catalog/product/helper/gallery.phtml
app/design/adminhtml/default/default/template/catalog/product/tab/inventory.phtml
app/design/adminhtml/default/default/template/currencysymbol/grid.phtml
app/design/adminhtml/default/default/template/customer/tab/addresses.phtml
app/design/adminhtml/default/default/template/customer/tab/view.phtml
app/design/adminhtml/default/default/template/notification/window.phtml
app/design/adminhtml/default/default/template/sales/order/create/data.phtml
app/design/adminhtml/default/default/template/sales/order/view/info.phtml
app/design/adminhtml/default/default/template/system/currency/rate/matrix.phtml
app/etc/applied.patches.list
app/locale/en_US/Mage_Adminhtml.csv
app/locale/en_US/Mage_Core.csv
app/locale/en_US/Mage_Sales.csv
app/locale/en_US/Mage_Sitemap.csv
js/mage/adminhtml/wysiwyg/tiny_mce/setup.js
js/mage/adminhtml/wysiwyg/tiny_mce/setup.js.orig
js/tiny_mce/plugins/media/js/media.js
js/varien/js.js
js/varien/js.js.orig
lib/phpseclib/PHP/Compat/Function/array_fill.php
lib/phpseclib/PHP/Compat/Function/bcpowmod.php
lib/phpseclib/PHP/Compat/Function/str_split.php

2

在M1版本1.9.4.0中,应用了所有先前的补丁,我得到以下错误

checking file app/Mage.php
Hunk #1 FAILED at 816.
1 out of 1 hunk FAILED

从补丁文件中可以看到,它正在寻找

diff --git app/Mage.php app/Mage.php
index 1136f6e9351..eb9e6db3a9e 100644
--- app/Mage.php
+++ app/Mage.php
@@ -816,9 +816,9 @@ final class Mage
             ',',
             (string) self::getConfig()->getNode('dev/log/allowedFileExtensions', Mage_Core_Model_Store::DEFAULT_CODE)
         );
-        $logValidator = new Zend_Validate_File_Extension($_allowedFileExtensions);
         $logDir = self::getBaseDir('var') . DS . 'log';
-        if (!$logValidator->isValid($logDir . DS . $file)) {
+        $validatedFileExtension = pathinfo($file, PATHINFO_EXTENSION);
+        if (!$validatedFileExtension || !in_array($validatedFileExtension, $_allowedFileExtensions)) {
             return;
         }

但是,这就是我所拥有的

        }

        try {
            if (!isset($loggers[$file])) {
                $logDir  = self::getBaseDir('var') . DS . 'log';
                $logFile = $logDir . DS . $file;

                if (!is_dir($logDir)) {
                    mkdir($logDir);

我在https://raw.githubusercontent.com/OpenMage/magento-mirror/1.9.4.0/app/Mage.php上确认我们具有正确的代码和版本。

如果找到解决方案将更新


与1.9.3.7相同的问题
veli

我同意@Haim。在M1版本1.9.4.0上应用SUPEE -11155补丁后,我也遇到相同的问题。出现一个错误以下,检查是否可以成功应用/还原补丁... -e错误:无法成功应用/还原补丁。正在检查文件app / Mage.php Hunk#1失败,为816。1之1失败,失败了让我知道是否有人找到解决方案
Vikas Gupta

2

使用open-mage-lts 1.9.4.1

检查文件app / design / adminhtml / default / default / template / catalog / product / helper / gallery.phtml Hunk#1 FAILED at59。1之1 Hunk FAILED

将-lts与核心进行比较:

00:20 $ diff app/design/adminhtml/default/default/template/catalog/product/helper/gallery.phtml /tmp/gallery.phtml 
62c62
<                 <th><?php echo str_replace("&lt;br/&gt;","<br/>",$this->escapeHtml($type['label'])); ?></th>
---
>                 <th><?php echo $this->escapeHtml($type['label']); ?></th>

该PR在-lts中引入

https://github.com/OpenMage/magento-lts/pull/596

https://github.com/OpenMage/magento-lts/pull/788


补丁代码:

-                <th><?php echo $this->escapeHtml($type['label']); ?></th>
+                <th><?php echo $this->escapeHtml($type['label'], array('br')); ?></th>

如果使用企业版1.14.4.0,则以前的安全补丁10888会导致相同的错误代码。此问题的修复程序用于更新app / design / adminhtml / default / default / template / catalog / product / helper / gallery.phtml的第61行从:<?php foreach($ _block-> getImageTypes()as $ typeId => $ type):?>到:<?php foreach($ _block-> getImageTypes()as $ typeId => $ type):?>
巴伯

2

SUPEE-11155(CE / EE)缺少的一点是,在Mage_Catalog_Helper_Product类文件getDefaultProductValue上引入了方法,并且依赖于DEFAULT_QTY常量。

问题在于,此变量在许多不同的修补程序文件中不存在,仅在其中几个文件中存在:https : //ibb.co/LzcL0gn

我们可以自己打补丁吗?Magento,您知道吗?

全部Thx


是什么让您说变量不在修补程序中是一个问题?该变量可能已经存在于那些版本的Magento中。
彼得·奥卡拉汉

@ PeterO'Callaghan Nop,问题在于此变量在所有版本上都不存在。在EE 1.14.0.1和EE 1.14.2.2上进行了测试,什么也没有。为了确认这一点,我们可以看到,在CE 1.8版本中,此变量未包含在补丁中,并且默认情况下都不存在于源代码中(请参见github.com/OpenMage/magento-mirror/blob/magento-1.8 / app / code /…)。因此,可以肯定的是,我们在多个CE / EE版本上都遇到了问题。
Antoine Kociuba

2

只是我还是这看起来不像是虫子?

PATCH_SUPEE-11155_EE_1.14.2.0_v3-2019-06-18-08-46-48.sh

  • 编写该函数是为了通过字段名称获取默认产品值,但始终返回以下任意一个:
    • $ fieldData ['inventory']; (库存)
    • self :: DEFAULT_QTY(此常量未定义)

我在这里想念什么吗?

   1026 diff --git app/code/core/Mage/Catalog/Helper/Product.php app/code/core/Mage/Catalog/Helper/Product.php
   1027 index 45756bf74dc..476483f35bb 100755
   1028 --- app/code/core/Mage/Catalog/Helper/Product.php
   1029 +++ app/code/core/Mage/Catalog/Helper/Product.php
   1030 @@ -485,4 +485,41 @@ class Mage_Catalog_Helper_Product extends Mage_Core_Helper_Url
   1031      {
   1032          return $this->_skipSaleableCheck;
   1033      }
   1034 +
   1035 +    /**
   1036 +     * Get default product value by field name
   1037 +     *
   1038 +     * @param string $fieldName
   1039 +     * @param string $productType
   1040 +     * @return int
   1041 +     */
   1042 +    public function getDefaultProductValue($fieldName, $productType)
   1043 +    {
   1044 +        $fieldData = $this->getFieldset($fieldName) ? (array) $this->getFieldset($fieldName) : null;
   1045 +        if (
   1046 +            count($fieldData)
   1047 +            && array_key_exists($productType, $fieldData['product_type'])
   1048 +            && (bool)$fieldData['use_config']
   1049 +        ) {
   1050 +            return $fieldData['inventory'];
   1051 +        }
   1052 +        return self::DEFAULT_QTY;
   1053 +    }
   1054 +
   1055 +    /**
   1056 +     * Return array from config by fieldset name and area
   1057 +     *
   1058 +     * @param null|string $field
   1059 +     * @param string $fieldset
   1060 +     * @param string $area
   1061 +     * @return array|null
   1062 +     */
   1063 +    public function getFieldset($field = null, $fieldset = 'catalog_product_dataflow', $area = 'admin')
   1064 +    {
   1065 +        $fieldsetData = Mage::getConfig()->getFieldset($fieldset, $area);
   1066 +        if ($fieldsetData) {
   1067 +            return $fieldsetData ? $fieldsetData->$field : $fieldsetData;
   1068 +        }
   1069 +        return $fieldsetData;
   1070 +    }

好消息是,它只能通过在代码中一个区域打来电话,只要你有一个有效的产品ID,你就不会调用此函数。但是,如果没有有效的产品ID,或者有人尝试根据其设计方式使用此功能,则可能会出现问题。

app / design / adminhtml / default / default / template / catalog / product / tab / inventory.phtml

<?php echo (bool)$this->getProduct()->getId() ? (int)$this->getFieldValue('min_sale_qty') : Mage::helper('catalog/product')->getDefaultProductValue('min_sale_qty', $this->getProduct()->getTypeId()) ?>

2

对于使用PHP 5.3(或低于5.4)的用户,此处是您需要更改的部分补丁。

供参考,这是用于PATCH_SUPEE-11155_CE_1.7.0.2_v4-2019-08-01-03-58-34

app / code / core / Mage / Adminhtml / controllers / Newsletter / TemplateController.php

$allowedHtmlTags = ['text', 'styles'];

FIX:
$allowedHtmlTags = array('text', 'styles');

app / code / core / Mage / Adminhtml / controllers / System / Email / TemplateController.php

$allowedHtmlTags = ['template_text', 'styles']

FIX:
$allowedHtmlTags = array('template_text', 'styles');

应用程序/代码/核心/法师/厘米/帮助器/Data.php

$statusSwf = $statusSwf->asArray()[0];

FIX:
$statusSwf = $statusSwf->asArray();
$statusSwf = $statusSwf[0];

注意:如果要在补丁文件中更改这些位置,请记住也要更改长度位置,因为要在补丁文件中添加换行符。例如,上面提到的最后一个:

@@ -74,4 +75,19 @@ class Mage_Cms_Helper_Data extends Mage_Core_Helper_Abstract

change to 

@@ -74,4 +75,20 @@ class Mage_Cms_Helper_Data extends Mage_Core_Helper_Abstract
             ^^ incremented

2

使用Inchoo PHP7模块运行PHP 7.0.x的EE 1.13.1.0:

促销>购物车规则(也可能是其他规则):您无法保存规则,将引发异常“指定了错误的规则”。

我们通过用1.14.xx中的一个重写Mage_Adminhtml_Helper_Data :: removeTags解决了这一问题(我使用1.14.4.0-不确定更改它的确切版本)。

更新后的版本:

public function removeTags($html)
{
    $html = preg_replace_callback(
        "# <(?![/a-z]) | (?<=\s)>(?![a-z]) #xi",
        function ($matches) {
            return htmlentities($matches[0]);
        },
        $html
    );
    $html =  strip_tags($html);
    return htmlspecialchars_decode($html);
}

1

与@Mat有相同的问题

On M1, 1.9.1.0 with all previous patches applied, I get numerous errors:

我的行结尾未在回购上设置为unix / macosx(另一个使用Win-dows的开发人员)。

使用dos2unix转换必要的文件并工作。

作为@chaoticgeek,我有:

Hunk #1 FAILED at 483. 1 out of 1 hunk FAILED -- saving rejects to file js/tiny_mce/plugins/media/js/media.js.rej

到目前为止,它已在所有存储库(6)上发生,分别为1.9.2.4、1.9.3.8 x 2、1.9.3.2 x 2和1.9.2.1。


在EE 1.13.10上确认了相同的问题
Laura

1

Magento CE 1.8.1上的相同问题,并应用了所有补丁:

正在检查文件app / Mage.php Hunk#1失败于813。1之1失败

有任何帮助/想法吗?



0

在M1上,我有1.9.1.0

Hunk #1 FAILED at 483 (different line endings).

即使我跑步

find . -type f -exec dos2unix {} \;

没有什么改变。

我怎么知道它是哪个文件?486是路径线吗?


可以找到任何解决方案,所以我不得不在Win环境中运行路径。由于修补仅适用于文件,因此不需要Web服务器。
Hypo

0

我目前在v1.9.3.1上遇到了一些冲突。我正在使用补丁的第三个版本(请参阅文件名):

编辑:经过一些检查,我们实际上缺少一些以前的补丁。稍后将更新。

PATCH_SUPEE-11155_CE_1.9.3.1_v3-2019-06-18-08-15-43.sh: 14: PATCH_SUPEE-11155_CE_1.9.3.1_v3-2019-06-18-08-15-43.sh: 127: not found
PATCH_SUPEE-11155_CE_1.9.3.1_v3-2019-06-18-08-15-43.sh: 14: PATCH_SUPEE-11155_CE_1.9.3.1_v3-2019-06-18-08-15-43.sh: 127: not found
PATCH_SUPEE-11155_CE_1.9.3.1_v3-2019-06-18-08-15-43.sh: 25: PATCH_SUPEE-11155_CE_1.9.3.1_v3-2019-06-18-08-15-43.sh: 0: not found
Checking if patch can be applied/reverted successfully...
-e ERROR: Patch can\'t be applied/reverted successfully.

checking file app/Mage.php
checking file app/code/core/Mage/Admin/Model/Block.php
checking file app/code/core/Mage/Admin/Model/User.php
Hunk #1 succeeded at 586 (offset -4 lines).
checking file app/code/core/Mage/AdminNotification/etc/system.xml
checking file app/code/core/Mage/Adminhtml/Block/Api/Role/Grid/User.php
checking file app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config.php
Hunk #1 FAILED at 155.
1 out of 1 hunk FAILED
checking file app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Preview.php
checking file app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Preview.php
checking file app/code/core/Mage/Adminhtml/Block/Permissions/Role/Grid/User.php
checking file app/code/core/Mage/Adminhtml/Block/Sales/Creditmemo/Grid.php
checking file app/code/core/Mage/Adminhtml/Block/Sales/Invoice/Grid.php
checking file app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Header.php
checking file app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/Create.php
checking file app/code/core/Mage/Adminhtml/Block/Sales/Order/Grid.php
checking file app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/Create.php
checking file app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Create.php
checking file app/code/core/Mage/Adminhtml/Block/Sales/Order/View.php
checking file app/code/core/Mage/Adminhtml/Block/Sales/Shipment/Grid.php
checking file app/code/core/Mage/Adminhtml/Block/Sales/Transactions/Grid.php
checking file app/code/core/Mage/Adminhtml/Block/System/Email/Template/Preview.php
checking file app/code/core/Mage/Adminhtml/Block/Template.php
checking file app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Abstract.php
checking file app/code/core/Mage/Adminhtml/Model/LayoutUpdate/Validator.php
Hunk #1 FAILED at 180.
1 out of 1 hunk FAILED
1 out of 1 hunk FAILED
checking file app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Baseurl.php
checking file app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Locale.php
checking file app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Serialized/Array.php
checking file app/code/core/Mage/Adminhtml/controllers/Catalog/Product/AttributeController.php
checking file app/code/core/Mage/Adminhtml/controllers/Catalog/Product/ReviewController.php
checking file app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php
checking file app/code/core/Mage/Adminhtml/controllers/Checkout/AgreementController.php
checking file app/code/core/Mage/Adminhtml/controllers/Newsletter/TemplateController.php
checking file app/code/core/Mage/Adminhtml/controllers/Promo/CatalogController.php
checking file app/code/core/Mage/Adminhtml/controllers/Promo/QuoteController.php
checking file app/code/core/Mage/Adminhtml/controllers/Sales/Order/CreateController.php
checking file app/code/core/Mage/Adminhtml/controllers/SitemapController.php
checking file app/code/core/Mage/Adminhtml/controllers/System/Email/TemplateController.php
checking file app/code/core/Mage/Catalog/Helper/Product.php
checking file app/code/core/Mage/Catalog/controllers/Product/CompareController.php
checking file app/code/core/Mage/Checkout/Model/Session.php
checking file app/code/core/Mage/Checkout/controllers/OnepageController.php
Hunk #1 succeeded at 570 (offset 8 lines).
checking file app/code/core/Mage/Cms/Helper/Data.php
checking file app/code/core/Mage/Cms/Model/Wysiwyg/Config.php
checking file app/code/core/Mage/Cms/etc/config.xml
checking file app/code/core/Mage/Compiler/Model/Process.php
checking file app/code/core/Mage/Core/Helper/Abstract.php
checking file app/code/core/Mage/Core/Helper/Data.php
checking file app/code/core/Mage/Core/Model/Design/Package.php
checking file app/code/core/Mage/Core/Model/Email/Template/Filter.php
checking file app/code/core/Mage/Core/Model/File/Validator/AvailablePath.php
checking file app/code/core/Mage/Core/Model/Observer.php
checking file app/code/core/Mage/Core/etc/config.xml
checking file app/code/core/Mage/Core/functions.php
checking file app/code/core/Mage/CurrencySymbol/Model/System/Currencysymbol.php
checking file app/code/core/Mage/Downloadable/controllers/DownloadController.php
checking file app/code/core/Mage/SalesRule/Model/Coupon/Massgenerator.php
checking file app/code/core/Mage/SalesRule/Model/Resource/Report/Rule/Createdat.php
checking file app/code/core/Mage/Sendfriend/etc/config.xml
checking file app/code/core/Mage/Sendfriend/etc/system.xml
checking file app/design/adminhtml/default/default/template/catalog/product/composite/fieldset/configurable.phtml
checking file app/design/adminhtml/default/default/template/catalog/product/helper/gallery.phtml
Hunk #1 FAILED at 59.
1 out of 1 hunk FAILED
checking file app/design/adminhtml/default/default/template/catalog/product/tab/inventory.phtml
checking file app/design/adminhtml/default/default/template/currencysymbol/grid.phtml
checking file app/design/adminhtml/default/default/template/customer/tab/addresses.phtml
checking file app/design/adminhtml/default/default/template/customer/tab/view.phtml
checking file app/design/adminhtml/default/default/template/notification/window.phtml
checking file app/design/adminhtml/default/default/template/sales/order/create/data.phtml
checking file app/design/adminhtml/default/default/template/sales/order/view/info.phtml
Hunk #4 succeeded at 176 (offset 22 lines).
Hunk #5 succeeded at 189 with fuzz 1 (offset 22 lines).
checking file app/design/adminhtml/default/default/template/system/currency/rate/matrix.phtml
checking file app/locale/en_US/Mage_Adminhtml.csv
checking file app/locale/en_US/Mage_Core.csv
checking file app/locale/en_US/Mage_Sales.csv
checking file app/locale/en_US/Mage_Sitemap.csv
checking file js/mage/adminhtml/wysiwyg/tiny_mce/setup.js
checking file js/tiny_mce/plugins/media/js/media.js
checking file js/varien/js.js
checking file lib/phpseclib/PHP/Compat/Function/array_fill.php
checking file lib/phpseclib/PHP/Compat/Function/bcpowmod.php
checking file lib/phpseclib/PHP/Compat/Function/str_split.php

0

从1.9.4.1更新到1.9.4.2时,我目前面临这个问题。因此,管理员订单创建和前端结帐现在会导致500个内部服务器错误,而不会记录或显示任何错误。


签出问题似乎影响使用Authorize.net Direct发布的php 7.1和php 7.2存储。您是否看到此处理器,Paypal或其他处理器出现500错误?我们还担心此安全更新会导致结帐。
themew

1
@themew我设法通过覆盖模块来修复错误。对我来说,错误是与PHP 5.4不兼容的代码
Vaishal Patel

0

应用Supee-11155补丁后,时事通讯跨国电子邮件模板保存出现问题,然后我更改了

app \ code \ core \ Mage \ Adminhtml \ controllers \ System \ Email \ TemplateController.php

$allowedHtmlTags = ['template_text', 'styles'];

$allowedHtmlTags = ['template_text', 'styles', 'variables'];

现在工作很好。

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.