Security Holes
Adding database interaction to an XHR exposes security holes that can allow malicious hackers to make requests to our server side. All they would need to know is the URL of the file in which to make the request. With the new debugging tools that are available, such as the ones that were covered in Chapter 8, “Debugging,” we can actually spy on requests and see the exact URL they are requesting along with the parameters that are passed. This is great for debugging, but provides anyone with the ability to easily understand the interactions that you are making with Ajax to the server by exposing your requests. This, of course, is a huge threat if you are connected to files that interact with a database or contain other important data ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access