-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: verify - no SQL Injection attacks
PostPosted: Thu Jul 28, 2005 7:08 pm 
Beginner
Beginner

Joined: Thu Jul 28, 2005 6:40 pm
Posts: 29
Hi;

I'm 99.9% certain this question is not necessary - but when it comes to security I prefer to be 1000% sure.

All of Hibernate is written so sql injection attacks won't work - correct?

thanks - dave


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 28, 2005 9:21 pm 
Senior
Senior

Joined: Thu May 12, 2005 11:40 pm
Posts: 125
Location: Canada
Yeah. Hibernate uses PreparedStatements.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 28, 2005 11:17 pm 
Senior
Senior

Joined: Tue Jun 21, 2005 10:18 am
Posts: 135
Location: South Carolina, USA
Injection attacks are still possible, I think, if you're not careful. Consider the following:

Code:
hqlText = "from SomeClass s where s.someString = '" + someValue + "'";

This is HQL, but it's still vulnerable, I think... of course, this is bad style anyway. It should be:

Code:
hqlText = "from SomeClass s where s.someString = ?";


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 28, 2005 11:24 pm 
Beginner
Beginner

Joined: Thu Jul 28, 2005 6:40 pm
Posts: 29
Hi;

Yes, by definition that is open. (It's amazing to me that there are people still coding that way.)

thanks - dave


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.