SQL Injection [message #1749609] |
Thu, 08 December 2016 10:39  |
Eclipse User |
|
|
|
A security review of one of our RAP based applications was conducted and produced the following exception:
"The application fails to adequately sanitize user supplied input. There are numerous fields throughout the application where encoding schemes (i.e. Base64) and encrypted malicious URLs can be entered into the form fields. All form fields need to be scrubbed to ensure only valid data can be inputted."
We have a number of forms/text fields where users will cut and paste data into these fields. Do others 'scrub' the data to insure questionable code isn't injected into this fields? I know the likelihood of it being executed may be nil, but I am interested to hear what others are doing.
I appreciate any comments or suggestions..
Thanks,
Kevin.
|
|
|
|
|
|
|
Re: SQL Injection [message #1750887 is a reply to message #1750633] |
Sat, 31 December 2016 02:08  |
Eclipse User |
|
|
|
Using java.sql.PreparedStatement goes a long way to preventing SQL injection vulnerabilities.
Don't get tempted to build a query by concatenating user input.
If you're really paranoid, write all your queries as stored procedures, only use CallableStatement to execute them and only give the database user access to execute your procedures, don't give the user access to the tables.
If you're lazy, use a persistence framework like JPA or Hibernate.
I feel this is getting off topic, as it has nothing specifically to do with RAP.
RAP doesn't have a clue what SQL is, so it's not going to escape your inputs for you.
|
|
|
Powered by
FUDForum. Page generated in 0.24581 seconds