Php Prestashop工具::getValue()函数是否不逃避sql注入?

Php Prestashop工具::getValue()函数是否不逃避sql注入?,php,sql,prestashop,code-injection,Php,Sql,Prestashop,Code Injection,我在prestashop论坛上读到函数Tools::getValue()不能逃避sql注入。现在我想知道,当我想要获取字符串或int值时,如何防止sql注入这个函数 有人能给我举个例子吗?Tools::getValue()只检索POST或GET值 为了防止SQL注入,可以使用pSQL()函数,也可以对int值进行类型转换 $int_val = (int)Tools::getValue('someValue'); $string_val = pSQL(Tools::getValue('some

我在prestashop论坛上读到函数
Tools::getValue()
不能逃避sql注入。现在我想知道,当我想要获取字符串或int值时,如何防止sql注入这个函数

有人能给我举个例子吗?

Tools::getValue()
只检索POST或GET值

为了防止SQL注入,可以使用
pSQL()
函数,也可以对int值进行类型转换

 $int_val = (int)Tools::getValue('someValue');
 $string_val = pSQL(Tools::getValue('someValue'));

谢谢,这对我很有帮助,现在我知道如何让普雷斯塔更安全了。