Re: fopen/fpassthur

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sebastian wrote:
Q> I hope you have some good data validation going on too :)

I am not too sure about how secure it is. basically, the files are called by
an ID
eg, download?type=file&id=3

so i query the db to get check if its a valid id and get the filename from
the db as well.
if its not found it errors out.. i was under the impression that is more
secure to get files by an id from db than doing something like
download?file=filename.zip

i am worried about security as i am not even sure if this method would allow
people to download any file from the server.
maybe if you have time you can look at the script for me and find any flaws

While this method may not present a clear security danger, how does the data get into the database? If I can feed a "filename" of anything on your system that you blindly put in the database, then I can call it with an appropriate URL.


So... you can trust data coming from your database only if it was trusted/validated/sanitized going in. :)

--

---John Holmes...

Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux