How valnurable is L2J in injections? ( I know use search but it doesnt allow me to search for some reason.)
I use Unix based OS for my server.
Security Question.
Forum rules
READ NOW: L2j Forums Rules of Conduct
READ NOW: L2j Forums Rules of Conduct
- janiii
- L2j Veteran
- Posts: 4269
- Joined: Wed May 28, 2008 3:15 pm
- Location: Slovakia
Re: Security Question.
java code uses prepared statements, and these should be fine. most sql injections can come from a (bad) web based account manager system.
DO NOT EVEN TRY TO MESS WITH ME!
forum flOOder dancing dEVILoper ♀
I don't give private support - PM will be ignored!
forum flOOder dancing dEVILoper ♀
I don't give private support - PM will be ignored!
- Zealar
- L2j Veteran
- Posts: 1236
- Joined: Sun Jul 15, 2007 10:29 am
Re: Security Question.
sql injections no work in l2j i test before 2 weaks but work for stupid MU
mysql > microsoft sql

mysql > microsoft sql
- ThePhoenixBird
- L2j Inner Circle
- Posts: 1857
- Joined: Fri May 27, 2005 5:11 pm
Re: Security Question.
Be sure tu use a good coded account mananger and if you use a statistic system be sure also that its properly secured, L2j as default is highly secure but it can be compromised due lame php scripts running on your site.
-
- Advanced User
- Posts: 1440
- Joined: Wed Apr 15, 2009 10:07 am
Re: Security Question.
Thanks for your replies.
-
- Posts: 271
- Joined: Wed Mar 19, 2008 10:16 am
Re: Security Question.
SQL injection comes from badly escaped parameters in SQL request. L2J uses prepared statement which should remove the problem.
Compare :
And
In the first call, you may have something like
which would execute as 3 SQL requests :
With the prepared statement, the whole string will be taken as parameter, with the ' chars understood as the ascii character and not as the string delimiter.
Compare :
Code: Select all
rs=stm.executeQuery("SELECT * FROM XYZ WHERE aaa=''+data+"'");
Code: Select all
stm=db.prepareStatement("SELECT * FROM XYZ WHERE aaa= ?");stm.setString(1,data);rs=stm.executeQuery();
Code: Select all
zzz'; INSERT INTO XXX(bbb,ccc) VALUES(1,2); SELECT * FROM XYZ WHERE aaa='yyy
Code: Select all
SELECT * FROM XYZ WHERE aaa='zzz';INSERT INTO XXX(bbb,ccc)VALUES(1,2);SELECT * FROM XYZ WHERE aaa='yyy'