Answer the question
In order to leave comments, you need to log in
Is there a need to protect against unauthorized access to functions that return data?
The view to display the page is invoked via the browser's address bar (main_page()) for authorized users only.
Decorators and other checks are used to restrict unauthorized access to such views.
In some project, there is a view that returns data (not related to the user model) from the database (get_data()). The request is made through the ajax function from the js script that was first loaded by main_page().
Can an unauthorized user send a request through the get_data() function and get the data using the address bar without loading the entire page? Do I need to protect every function in the project with a decorator?
Answer the question
In order to leave comments, you need to log in
The request is made through the ajax function from the js script that was first loaded by main_page().
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question