SQL INJection
#3

I asked you if i have to escape all the strings, for example this:

Код HTML:
format(str, sizeof(str), "Car Color ID 1?", price);
			    			ShowPlayerDialog(playerid, 14511, DIALOG_STYLE_INPUT, "Paint Car", str, "Yes", "No");
				}
and dialogid
Код HTML:
if(dialogid == 14511)
 	{
 	    if(response)
 	    {
 	        if(!isnull(inputtext))
 	        {
 	            new points = strval(inputtext);
 	            new str[128];
					if(points >= 0)
					{
							col1[playerid] = points;
mysql_real_escape_string(col1[playerid], col1[playerid]);
							format(saveQuery, sizeof(saveQuery), "UPDATE playeraccounts SET playerCarColour1 = '%d'  WHERE playerID = '%d'",col1[playerid], PlayerData[playerid][pInternalID]);
						mysql_tquery(handle,saveQuery);
					}
	 	   }
          }
  }
It must be escaped?


Do you wanna say that i can use %e like

Код HTML:
format(saveQuery, sizeof(saveQuery), "UPDATE playeraccounts SET playerCarKM = '%e' WHERE playerID = '%d'",PlayerData[playerid][pCarKM],PlayerData[playerid][pInternalID]);
	mysql_tquery(handle,saveQuery);
instead %d, %f (float ) or any type?


Please make me an example.
PS: I searched INPUTTEXT on the entire GM and all the strings are escaped. How can I see where's the problem?
Reply


Messages In This Thread
SQL INJection - by Nin9r - 03.06.2016, 22:58
Re: SQL INJection - by SickAttack - 03.06.2016, 23:04
Re: SQL INJection - by Nin9r - 05.06.2016, 09:53
Re: SQL INJection - by Spmn - 05.06.2016, 10:46
Re: SQL INJection - by Konstantinos - 05.06.2016, 10:54
Re: SQL INJection - by Nin9r - 05.06.2016, 11:10
Re: SQL INJection - by Konstantinos - 05.06.2016, 11:19
Re: SQL INJection - by Nin9r - 05.06.2016, 11:22
Re: SQL INJection - by Noris - 05.06.2016, 15:09
Re: SQL INJection - by Nin9r - 05.06.2016, 15:24

Forum Jump:


Users browsing this thread: 1 Guest(s)