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

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

jsf - How to ajax update an item in the footer of a PrimeFaces dataTable? -

jquery - Keeping Kendo Datepicker in min/max range -