I am currently working on a web application where there are different levels of access. Users can get access to some areas of the application, but may not be allowed to access another area.
The application is built with clean URLs, such as: http://mysite.com/projects/newproject1
The system determines what the user can access and creates buttons/menus/links for those items. The user will never see a link/button or menu to something that he does not have access to.
However, since the application is built with clean URLs, someone who should not have access to the project module or "newproject1" in the project module can try and access that area directly via the URL. The URL might be sent to them by another email, or they could just be trying to be smart and see if they can access that area of the application.
I am currently considering to treat all "forbidden request" cases as a "Page not found" error:
- Instead of sending a 403 in the HTTP response, a 404 will be sent.
- A message tell them that the page is unavaliable instead of one saying that they are not allowed to access it and to contact their sysadmin for any questions.
- The same will apply for page not found errors. A 404 will be sent, and we will display a message saying the page is unavaliable.
Is this a good idea?