I am developing a wordpress plugin, where user can write their custom js function which is executed by plugin. They can share the codes to other and can import other's codes also. My concern is user can do ajax request via their function and can mess with database. So how do I check if a function is making ajax request and stop it from executing.
Solution i can think of are:-
- Block all ajax related keywords like AJAX, xmlhttp, GET, POST
- Having some global switch
ajax = false;
which line will turn off all AJAX functions, and turn it on when required and turning off once done.
I have never faced security issues like this before, so don't have any idea.
What can be different ways user can mesh with database?