php - Is addInCondition() method in CDbCriteria "SQL-injection proof"? -
php - Is addInCondition() method in CDbCriteria "SQL-injection proof"? -
i wanna utilize cdbcriteira addincondition() multiple input parameters (number not predefined). method compose parametrized query or not? found controversial thoughts on this:
yes - "since uses cdbcriteria assume safe" - quote. noalso i've looked @ the addincondition() method specification , couldn't clear though.
this part of code:
$condition=$column.'='.self::param_prefix.self::$paramcount; $this->params[self::param_prefix.self::$paramcount++]=$value;
seems storing parametrized values.
then in query builder, utilize them numerated parameters.
i way in script made myself, uncertainty qian (or whatever) miss , leave code injection.
also, did test it? add together random sql , see if gets escaped.
php yii sql-parametrized-query yii-cactiverecord
Comments
Post a Comment