SQL inject - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: SQL inject (
/showthread.php?tid=374334)
SQL inject -
toi - 02.09.2012
how to protect my server against mysql inject. I put that string and under what calback
Tank
Re: SQL inject -
toi - 04.09.2012
up please
Re: SQL inject -
doreto - 04.09.2012
https://sampwiki.blast.hk/wiki/MySQL#mys..._escape_string check it
Re: SQL inject -
sgtjones12 - 04.09.2012
I didnt know SA-MP servers could get sql injections wow
Re: SQL inject -
doreto - 04.09.2012
Quote:
Originally Posted by sgtjones12
I didnt know SA-MP servers could get sql injections wow
|
I dont know too but more security its not problem
Re: SQL inject -
mamorunl - 04.09.2012
Quote:
Originally Posted by sgtjones12
I didnt know SA-MP servers could get sql injections wow
|
Everything that uses input from the user is subjective to SQL Injections. In a SA:MP server you use dialogs, commands etc. Even your name can be an SQL inject command (of only 24 chars long though).
mysql_real_escape_string() is the first command that you can use and another would be something like add_slashes (PHP) to escape the special chars (' " \)