note 65146 deleted from security.general by danbrown
| From: | danbrown@php.net | Date: | Tue, 24 Nov 2009 16:13:39 +0000 |
| Subject: | note 65146 deleted from security.general by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-163245@lists.php.net to get a copy of this message | ||
Note Submitter: yairl at savion dot huji dot ac dot il
----
Important Security Note for emacs users
Many linux/unix developers like the emacs editor to write code. It's a great editor with many
features for PHP/Perl developers. emacs by default creates a back up file ending with ~. Then when
you create a file myprogram.php it creates a back up file myprogram.php~ . You can change this
default behavoir to avoid emacs creates this file but many people prefer to keep this default. The
problem is that through the webserver people can load this file ending with ~ and can see your php
code because the webserver doesn't parser this file as php type due to the ~. This behavoir is
a strong security hole, it permits to everybody to see and hack your code. i recommend to emacs
users to deny access to files ending with ~ in general to avoid this problem.
In general PHP developers must check that the editor they are using is not creating a file beside
the php source file without the end file name .php necessary for the webserver to parser it as php
application.
in apache webserver you can deny access to these files with the following configure order
<File "*~">
Deny all
</File>