C
coder
This has probably been answered a 1000 times, but I haven't found it in a
search.
I have an application where the user uploads documents and I have logic for
him to view them. All documents are put into a user specific directory.
Any give user can only see his documents and documents for which the admin
level is less than or equal to his admin level (these are stored in a
database along with file location and other data).
The problem is that if the user can determine the location of his files,
then he could construct a URL for other files to which he does not have
access simply by finding the path , changing a user ID number, and
guessing/knowing the desired file name to look at. This would be extremely
difficult if I could make the top level directory dificult to find. So, how
does one go about hiding the path name to a file in the URL?
search.
I have an application where the user uploads documents and I have logic for
him to view them. All documents are put into a user specific directory.
Any give user can only see his documents and documents for which the admin
level is less than or equal to his admin level (these are stored in a
database along with file location and other data).
The problem is that if the user can determine the location of his files,
then he could construct a URL for other files to which he does not have
access simply by finding the path , changing a user ID number, and
guessing/knowing the desired file name to look at. This would be extremely
difficult if I could make the top level directory dificult to find. So, how
does one go about hiding the path name to a file in the URL?