note 65146 added to security.general

From: Date: Tue, 25 Apr 2006 10:14:35 +0000
Subject: note 65146 added to security.general
Groups: php.notes 
Request: Send a blank email to php-notes+get-109649@lists.php.net to get a copy of this message
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> ---- Server IP: 66.163.161.117 Probable Submitter: 128.139.226.37 (proxied: 132.64.52.91) ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/security.general.php Edit -- http://master.php.net/note/edit/65146 Del: integrated -- http://master.php.net/note/delete/65146/integrated Del: useless -- http://master.php.net/note/delete/65146/useless Del: bad code -- http://master.php.net/note/delete/65146/bad+code Del: spam -- http://master.php.net/note/delete/65146/spam Del: non-english -- http://master.php.net/note/delete/65146/non-english Del: in docs -- http://master.php.net/note/delete/65146/in+docs Del: other reasons-- http://master.php.net/note/delete/65146 Reject -- http://master.php.net/note/reject/65146 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#109649) next »