Security Question.

This is not a Support area! Discuss about the Server here. Non-Server related discussion goes in Off-Topic Discussion.
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
JMD
Advanced User
Advanced User
Posts: 1440
Joined: Wed Apr 15, 2009 10:07 am

Security Question.

Post by JMD »

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.
User avatar
janiii
L2j Veteran
L2j Veteran
Posts: 4269
Joined: Wed May 28, 2008 3:15 pm
Location: Slovakia

Re: Security Question.

Post by janiii »

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!
User avatar
Zealar
L2j Veteran
L2j Veteran
Posts: 1236
Joined: Sun Jul 15, 2007 10:29 am

Re: Security Question.

Post by Zealar »

sql injections no work in l2j i test before 2 weaks but work for stupid MU :P

mysql > microsoft sql
User avatar
ThePhoenixBird
L2j Inner Circle
L2j Inner Circle
Posts: 1857
Joined: Fri May 27, 2005 5:11 pm

Re: Security Question.

Post by ThePhoenixBird »

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.
JMD
Advanced User
Advanced User
Posts: 1440
Joined: Wed Apr 15, 2009 10:07 am

Re: Security Question.

Post by JMD »

Thanks for your replies.
Vapulabe
Posts: 271
Joined: Wed Mar 19, 2008 10:16 am

Re: Security Question.

Post by Vapulabe »

SQL injection comes from badly escaped parameters in SQL request. L2J uses prepared statement which should remove the problem.

Compare :

Code: Select all

rs=stm.executeQuery("SELECT * FROM XYZ WHERE aaa=''+data+"'");
And

Code: Select all

stm=db.prepareStatement("SELECT * FROM XYZ WHERE aaa= ?");stm.setString(1,data);rs=stm.executeQuery();
In the first call, you may have something like

Code: Select all

zzz'; INSERT INTO XXX(bbb,ccc) VALUES(1,2); SELECT * FROM XYZ WHERE aaa='yyy
which would execute as 3 SQL requests :

Code: Select all

SELECT * FROM XYZ WHERE aaa='zzz';INSERT INTO XXX(bbb,ccc)VALUES(1,2);SELECT * FROM XYZ WHERE aaa='yyy'
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.
Post Reply