This is a question has has been bother me for a while, so I am looking for opinions and solutions to clamp down on the possibility of the app being a security risk.
I use jQuery for lots of things, but mainly I use it for processing jQuery dialog windows. A lot of times there is the need to grab a value from a field on the form, concatenate that information with a .serialize() command and pass it off to jQuery ajax call to head over to PHP files for database interaction.
Here comes my question (finally),
Isn't it riduclasly easy to 'guess' what the url could look like for the PHP processing?
You can open the source in a modern browser and click a link to look at the full JavaScript file containing the ajax call.
I could possibly Minify the JavaScript file for obfuscation, but that's not a form of security to be relied apon.
I am using PDP for databases access with prepared statements for SQL injection attacks, but if someone took to the time to look, couldn't they just form a valid url send it off to the database and insert what they want?
I am not talking about hacking the database to steel information, I am more talking about inserting malicious information as though the data was added from the application itself. Think adding something to your shopping cart that is $50 for only $25.
If it just as simple as turning the ajax request from GET to POST and changing my PHP files?
Edit: The person is logged in and properly authenticated.
Just wondering what other people out there do.
Thanks!