8
I am a programmer HTML/CSS/PHP a few years and by incredible and more impossible it seems, I’m just entering the world of Javascript with jQuery and AJAX now. My question is whether the security level is affected by passing parameters by AJAX as the source code of the javascript is exposed if we do not decide to encrypt it in any way.
When for example we have to pass parameters to PHP through the AJAX, unless we switch the variables inside the PHP, they are kind of discovered already in the passage of paramenters in the AJAX besides that the urls, at least I for lack of knowledge, beginner, I have passed the urls absolute archives.
How dangerous is that? To what extent would it affect system security? Remembering that this question is not based on wanting opinions but on technical grounds that explain the same.
Sergio’s answer is correct, but just to cover all the bases, please clarify the following: 1) the user authentication continues using cookies, or changed something after you passed to Ajax? 2) Were you protecting yourself against CSRF before? Are you still doing the same now? 3) Do you make Ajax requests for a different domain? (CORS) 4) Can other websites make Ajax requests for your domain? (also CORS)
– mgibsonbr