Click here to Skip to main content
15,886,362 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

How we can secure the our web Application by using Jquery or java script.

and if we connected to data base through java script. is this Secure or not?
Posted
Comments
Richard C Bishop 15-Aug-13 14:21pm    
I am no expert, but I would think that both of those ideas are probably not in your best interest.

Experts, chime in.....
$r!dh@r 15-Aug-13 14:25pm    
acutally in my applcaition i have connection using java script, but my system is hacked.
so how can protect through java script. there is any specific way to connect through java script.
Richard C Bishop 15-Aug-13 14:29pm    
Your very comment is the exact reason why I said what I did.

1 solution

Everything that is on the client side (including html and javascript) can be completely changed/removed by a hacker. For this simple reason putting your defense lines into client-side javascript would be ridiculous. You can secure your application only on the server side: Make sure that the public interface of your server side code can not be abused in any way from the client side. In other words: Make sure that I can not issue an evil crafted request (with fancy parameters) to your server side code (for example with my evil python script) so that it takes an action you don't want as the owner of the site: for example:
- responding to my python script by sending sensitive info from your db or site
- making damage to your db (sql inject) - like deleting a table or entries
....

In your client side script and html you have to make sure that:
- it works as intended (cosmetics)
- it doesn't reveal exploitable info about your server side code
 
Share this answer
 
Comments
Zoltán Zörgő 15-Aug-13 14:51pm    
That's it. +5
pasztorpisti 15-Aug-13 16:15pm    
Thank you!
H.Brydon 15-Aug-13 16:56pm    
You beat me to it. That's pretty close to the answer I was going to give.

+5
pasztorpisti 15-Aug-13 17:11pm    
Thank you! :-)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900