flow.php line 375,flow.php  找到375行:

         * 保存收货人信息
*/
$consignee = array(
'address_id' => empty($_POST['address_id']) ? 0 : intval($_POST['address_id']),
'consignee' => empty($_POST['consignee']) ? '' : compile_str(trim($_POST['consignee'])),
'country' => empty($_POST['country']) ? '' : intval($_POST['country']),
'province' => empty($_POST['province']) ? '' : intval($_POST['province']),
'city' => empty($_POST['city']) ? '' : intval($_POST['city']),
'district' => empty($_POST['district']) ? '' : intval($_POST['district']),
'email' => empty($_POST['email']) ? '' : compile_str($_POST['email']),
'address' => empty($_POST['address']) ? '' : compile_str($_POST['address']),
'zipcode' => empty($_POST['zipcode']) ? '' : compile_str(make_semiangle(trim($_POST['zipcode']))),
'tel' => empty($_POST['tel']) ? '' : compile_str(make_semiangle(trim($_POST['tel']))),
'mobile' => empty($_POST['mobile']) ? '' : compile_str(make_semiangle(trim($_POST['mobile']))),
'sign_building' => empty($_POST['sign_building']) ? '' :compile_str($_POST['sign_building']),
'best_time' => empty($_POST['best_time']) ? '' : compile_str($_POST['best_time']),
);

这里代码多了个函数 compile_str。 改函数是ecshop最新补丁新加入进入的。原本的这块代码是

           'address_id'    => empty($_POST['address_id']) ? 0  : intval($_POST['address_id']),
'consignee' => empty($_POST['consignee']) ? '' : trim($_POST['consignee']),
'country' => empty($_POST['country']) ? '' : $_POST['country'],
'province' => empty($_POST['province']) ? '' : $_POST['province'],
'city' => empty($_POST['city']) ? '' : $_POST['city'],
'district' => empty($_POST['district']) ? '' : $_POST['district'],
'email' => empty($_POST['email']) ? '' : $_POST['email'],
'address' => empty($_POST['address']) ? '' : $_POST['address'],
'zipcode' => empty($_POST['zipcode']) ? '' : make_semiangle(trim($_POST['zipcode'])),
'tel' => empty($_POST['tel']) ? '' : make_semiangle(trim($_POST['tel'])),
'mobile' => empty($_POST['mobile']) ? '' : make_semiangle(trim($_POST['mobile'])),
'sign_building' => empty($_POST['sign_building']) ? '' : $_POST['sign_building'],
'best_time' => empty($_POST['best_time']) ? '' : $_POST['best_time'],

该函数是为补漏洞的。 在文件lib_base.php 776行。

/**
* 过滤用户输入的基本数据,防止script攻击
*
* @access public
* @return string
*/
function compile_str($str)
{
$arr = array('<' => '<', '>' => '>');
return strtr($str, $arr);
}
该函数是为补漏洞的。 过滤用户输入的基本数据,防止script攻击!所以如果网站提示缺少此函数,直接补个函数就可以了。贴在flow.php底部,问题就解决了

报错compile_str() flow.php on line 375的解决方法的更多相关文章

  1. MongoDB解压报错gzip: stdin: not in gzip format的解决方法

    MongoDB解压报错gzip: stdin: not in gzip format的解决方法 在安装MongoDB时出现如下报错: [root@vm172--- mongodb]# tar -zxv ...

  2. 支付宝 报错 rsa_private read error : private key is NULL解决方法

    原因:  真机调试IOS支付宝功能GDB出现 rsa_private read error : private key is NULL提示 调试iOS 支付宝SDK的时候,执行demo.把 Partn ...

  3. mysql用查询结果当删除的判断条件进行删除报错1093 You can't specify target table解决方法

    mysql用查询结果当删除的判断条件进行删除报错1093 You can't specify target table解决方法 #分开两个sql执行正常的语句,只保留最新1000条数据,删掉1000条 ...

  4. 报错NameError: name ‘null’ is not defined的解决方法

    报错NameError: name 'null' is not defined的解决方法 eval()介绍 eval()函数十分强大,官方demo解释为:将字符串str当成有效的表达式来求值并返回计算 ...

  5. python中引入包的时候报错AttributeError: module 'sys' has no attribute 'setdefaultencoding'解决方法?

    python中引入包的时候报错:import unittestimport smtplibimport timeimport osimport sysimp.reload(sys)sys.setdef ...

  6. 修改ubuntu DNS的步骤/wget url报错: unable to resolve host address的解决方法

    wget url 报错:unable to resolve host address ‘url’,显然是无法解析主机地址,这就能看出是DNS解析的问题.解决办法就是配置可用的dns 一般是修改成为谷歌 ...

  7. loadruner报错:Step download timeout(120 seconds)的一个解决方法

    一个网友问了我一个问题如下: loadruner报错:Error -27728: Step download timeout (120 seconds) 如何解决 语 法检查通过,但是在并发执行一个查 ...

  8. Centos6 下启动httpd报错 Could not reliably determine the server's解决方法

    在启动httpd的时候报错: 修改/etc/httpd/conf/httpd.conf 配置,去掉ServerName 前的#(或者手动添加ServerName localhost:80)然后重启ht ...

  9. 转:loadruner报错:Step download timeout(120 seconds)的一个解决方法

    一个网友问了我一个问题如下:loadruner报错:Error -27728: Step download timeout (120 seconds) 如何解决语法检查通过,但是在并发执行一个查询时候 ...

随机推荐

  1. MFC--自定义消息

    在windows程序中,消息是一个重要的概念,最常见的消息一般都是以WM_开头,WM就是window message,窗口消息的缩写,通过处理标准的windows消息,我们可以改变窗口的外观,如使用W ...

  2. javascript学习笔记--迭代函数

    概要 这里的迭代函数指的是对数组对象的操作方法,js数组共有五个迭代函数:every.fifter.forEach.map.some. 1.every every方法,返回值为Boolean类型,tr ...

  3. svn强制用户提交时写日志

    #!/bin/sh REPOS="$1" TXN="$2" SVNLOOK=/usr/bin/svnlook #根据你的SVN目录而定 LOGMSG=`$SVN ...

  4. 3xx Redirection

    3xx Redirection This class of status code indicates the client must take additional action to comple ...

  5. Net 通常用于dll 第三方插件

    log4net.dll ----记录日志 本人用能够 pangu.dll ----分词工具 用于高级搜索  拆分字词 能够非常好用 fastreport --------高速制作报表工具 本人仅仅做过 ...

  6. poj 2513 连接火柴 字典树+欧拉通路 好题

    Colored Sticks Time Limit: 5000MS   Memory Limit: 128000K Total Submissions: 27134   Accepted: 7186 ...

  7. About Unixstickers - Unixstickers - stickers on unix, programming, software, development and open source

    About Unixstickers - Unixstickers - stickers on unix, programming, software, development and open so ...

  8. sql连接错误(Microsoft SQL Server,错误:2)

    昨天用SQL语句建表的时候写了一段代码,对于代码的逻辑和内容我不太肯定对不正确.反正是毫不犹豫的让它运行了,过程中出现好几个错误,当时没有太在意,想着大不了出错了再重写一个.结果--玩坏了,从昨天到如 ...

  9. VSTO 得到Office文档的选中内容(Word、Excel、PPT、Outlook)

    原文:VSTO 得到Office文档的选中内容(Word.Excel.PPT.Outlook) 目的:得到在Word.Excel.PPT.Outlook中选中的一段内容. Word: private ...

  10. ASP.NET MVC的跳转攻击问题

    在ASP.NET MVC的自带的模板代码中,有这样一段,用来拦截非登录用户,使其跳转到登录页面,然后登录后在跳转回原页面.所以,期间有一个returnUrl参数用来保存原页面地址.在Login Act ...