BUG 5408 this issue was improved.
I've not been able to reproduce this bug, however I could see into the code it's doing "SELECT FIELD_UID, FIELDA, FIELDB FROM YOURTABLE" then to solve this issue I have added some code now the code it's doing "SELECT FIELD_UID, FIELDA, FIELDB FROM YOURTABLE where FIELDA LIKE 'FIELDSEARCH%'"
This commit is contained in:
@@ -23,7 +23,20 @@ if( isset($request) ){
|
||||
try{
|
||||
$sData = base64_decode(str_rot13($_GET['hash']));
|
||||
list($SQL, $DB_UID) = explode('@', $sData);
|
||||
//fixed: improving the statement sql by krlos
|
||||
$sSql=substr($SQL, 6, strlen($SQL));
|
||||
$pattern = "/\bfrom\b/i";
|
||||
$replacement = 'FROM';
|
||||
$sSql = preg_replace($pattern, $replacement, $sSql);
|
||||
$aSql = explode("FROM", $sSql);
|
||||
|
||||
$afieldSql = explode(",",$aSql[0]);
|
||||
|
||||
if(count($afieldSql)>1)
|
||||
$SQL .= "where $afieldSql[1] like '". $_GET['input']."%'";
|
||||
else
|
||||
$SQL .= "where $afieldSql[0] like '". $_GET['input']."%'";
|
||||
//add fixed
|
||||
$aRows = Array();
|
||||
try {
|
||||
$con = Propel::getConnection($DB_UID);
|
||||
|
||||
Reference in New Issue
Block a user