|
Posted by Good Man on 05/14/07 21:52
"Zoe Brown" <zoenaomibrown@N-O-S-P-A-A-Mtesco.net> wrote in
news:lk32i.12268$H4.3485@newsfe2-gui.ntli.net:
> But using your logic i could create a pdf file called
> 6ruyhfn7k34bfdwq.pdf, store the filename along with username/password
> in the DB and then the only wany someone could access it would be to
> guess the filename. I dont see how your methid is safer ?
True, you could rename the PDF, but surely the original PDF file name is
of some value for your end user (ie: someone being prompted to download
"floor_plans.pdf" versus "12983dohfsdof7.pdf")
And also true, you could just put the PDF file in a *directory* that is
randomly named...
The only advantages to my suggested method over any of these two is
1) No extra folders/directories are being created on the server
2) The PDF is *guaranteed* not to be spidered and/or accessible via the
web root
3) A user *must* be logged in to retrieve the file. If you go with the
file/directory renaming route, your user can bookmark the link to the
secret PDF and pass it on to whomever they wish. With my proposed
system, "streamFile.php" checks to see if the user is logged in before
allowing the file to stream, and for users who aren't on your system -
well, they can't download the file at all.
When a client says to me 'these are sensitive documents that should not
be seen by anyone except authorized people', i automatically place them
outside of any web directory, and use my suggested method. habit i
guess, but it works, is secure, and achieves all my goals.
Good luck!
Navigation:
[Reply to this message]
|