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. 设计模式(三)-- 适配器模式(Adapter)

    适配器模式(Adapter) 考虑一个记录日志的应用,由于用户对日志记录的要求很高,使得开发人员不能简单地采用一些已有的日志工具或日志框架来满足用户的要求,而需要按照用户的要求重新开发新的日志管理系统 ...

  2. Swift - 给表格的单元格UITableViewCell添加图片,详细文本标签

    表格UITableView中,每一单元格都是一个UITableViewCell.其支持简单的自定义,比如在单元格的内部,添加图片和详细文本标签. 注意UITableViewCell的style: (1 ...

  3. 怎样将baidu地图中的baidu logo 去掉

    今天我的老大问我是不是能够将baidumap 的js版中baidu logo 去掉. 我上网查询一下,有各种方法.比方将相应的logo div remove hide 等等,这些都是须要JS 函数触发 ...

  4. A*寻路算法的实现

    原理:http://www.cppblog.com/christanxw/archive/2006/04/07/5126.html 算法理论请到原理这个传送门,代码中的注释,已经比较详细,所以我不会讲 ...

  5. jQuery EasyUI API 中文文档 - 链接按钮(linkbutton)

    <html> <head> <script src="jquery-easyui/jquery.min.js"></script> ...

  6. C语言实现通用数据结构的高效设计

    近期在阅读一个开源的C++代码.里面用到了大量的STL里面的东西.或许是自己一直用C而非常少用C++来实现算法的原因.STL里面大量的模板令人心烦.一直对STL的效率表示怀疑,但在网上搜到这样一个帖子 ...

  7. 移植ffmpeg到VC环境心得

    所有想学习ffmpeg的网友有福了,大名鼎鼎的ffmpeg,移植到Windows的VC6版本全部开源,编译环境为VC6+SP5+VCPP5.别忘记了顶贴哦. 移植ffmpeg到windows,主要的修 ...

  8. Bean-Query 一个把对象转换为Map的Java工具库

    刚开源了一个经过完整測试的Java工具类. 地址例如以下: https://github.com/Jimmy-Shi/bean-query 使用说明例如以下: Bean-query Click Her ...

  9. 经常使用Firefox插件大全

    Web开发者经常使用的火狐插件 1)FireShot:是一个截图工具,来源于截图软件Screenshot Studio的开发商,是一个Firefox扩展或者说是Firefox版的Screenshot ...

  10. [置顶] 一步一步学android之事件篇——下拉列表事件

    上一篇RadioGroup比较简单,所以再学习个spinner的OnItemSelectedListener事件,前面说过spinner的主要功能就是提供列表显示的选择,比如我们在选择城市的时候就会用 ...