腾讯安全检测报错:
[10501]SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"\\%5C%0d%0a%23# * pi()) / 180) / 2), 2))))) AS distance,`id`,`name`,`phone`,`im' at line 1
[10501]SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '??""\\\## * pi()) / 180) / 2), 2))))) AS distance,`id`,`name`,`phone`,`image`,' at line 1
[10501]SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '??""\\\## * pi()) / 180) / 2), 2))))) AS distance FROM `aaa_system_store` WHER' at line 1
问题位置:如图,SystemStoreDao文件 distance函数
问题原因:$latitude变量 字符串插值可能会导致 SQL 注入的安全问题
有没有好的优化方法?
【产品名称】:多店版
【产品版本】:v2.6
【部署方式】:linux/
【部署环境】:线上环境
【php版本】:例:7.4
【Mysql版本】:例:5.7