You are here: Re: PHP-generated link to local file doesn't work when clicked on. Why? « All PHP « IT news, forums, messages
Re: PHP-generated link to local file doesn't work when clicked on. Why?

Posted by Martin Jay on 06/02/06 18:42

In message <1149143755.573486.319380@j55g2000cwa.googlegroups.com>,
wylbur37 <wylbur37nospam@yahoo.com> writes
>Martin Jay wrote:
>> In message <1149101295.601620.259980@c74g2000cwc.googlegroups.com>,
>> wylbur37 <wylbur37nospam@yahoo.com> writes
>> >
>> >What's the use of Mozilla/Firefox refusing to honor links to local
>> >files "for security reasons" when any website can still access
>> >a user's files anyway by means of a PHP script?
>>
>> I don't understand what you mean. Can you give an example of a PHP
>> script, running on a server, being able to access files on a user's
>> (client) machine?

>In my original posting, when I described running a PHP script called
>test3.php on my localhost Apache server (where the server and the
>client are on the same physical computer), I could also include code
>that reads and writes to the c: drive, so I assumed that if that same
>script were installed on a physically remote server, it would also be
>able to read and write to the C: drive of my computer if I were to
>visit the webpage with that PHP script.
>But now I realize that if that were the case, the C: drive that would
>be accessed would be the one on the *server's* computer and not *my*
>computer. Is that correct?

Ah, yes. I think I understand now.

And yes, a PHP script accessing a file on the drive would look on the
server and not on the client's drive.

>By the way, the informative webpage mentioned
>(http://kb.mozillazine.org/Links_to_local_pages_don't_work)
>said that ...
>
> For security purposes, Firefox and Mozilla Suite block links to
> local files (and directories) from remote files. This includes
> linking to files on your hard drive, on mapped network drives, and
> accessible via UNC paths. This prevents a number of unpleasant
> possibilities, including:
>
> * Allowing sites to detect your operating system by checking
> default installation paths
> * Allowing sites to exploit system vulnerabilities (e.g.,
> C:\con\con in Windows 95/98)
> * Allowing sites to detect browser preferences or read sensitive
> data
>
>Could someone explain how the above three "unpleasant possibilities"
>could actually happen?

I'm not a security expert, so I'll leave this for someone with more
knowledge about the matter to provide details. There is some
information about C:\con\con at
<http://everything2.com/index.pl?node_id=83247>. Or you might get an
explanation in one of the security newsgroups.
--
Martin Jay
Phone/SMS: +44 7740 191877
Fax: +44 870 915 2124

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация