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. no

also 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

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -