javascript - jQuery security issue -


i'm feeling scared solution i'm using in 1 of app. basically, use snippet :

var username = ...; $.ajax({ type: "post",     url: "getfeed.php",     data: "username="+username,     success: function(html) {     // stuff              } }); 

my question : hackable ? if use chrome/firefox/... build-in code editor , replace var username = ... var username = 'user1';, work ?

thanks

yes, javascript debugger able change variable whatever username want. javascript open user , can modified easily.

typically have login page authenticate user (often cookie based), , on every subsequent request (ajax or otherwise) able authenticate cookie , make sure user says is. require server side solution authentication.


Comments

Popular posts from this blog

rdbms - what exactly the undo information lives in oracle? -

bash - How do you programmatically add a bats test? -

java - Getting exception in JDBC thin driver -