There could be security issues in the method you proposed.
I had a similar problem having to serve data files to the client in an authenticated session. If the files are free to download, an unauthorized user could get them guessing the filenames (and randomize filenames was not an option, because "regular" users wanted meaningful names).
In the end I used a Perl cgi script that serves the file provided that you ask it with name and md5 hash of its content. So in the authenticated pages I have a link containing both of them, but no one can guess the hash based on a (guessed) filename.
Rule One: "Do not act incautiously when confronting a little bald wrinkly smiling man."
|