mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
More secure example
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@39334 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
1500908674
commit
5a33c538eb
2 changed files with 2 additions and 2 deletions
|
@ -390,7 +390,7 @@ echo "$file_to_delete has been deleted!";
|
|||
<title>More secure file name checking</title>
|
||||
<programlisting role="php">
|
||||
<?php
|
||||
$username = $HTTP_REMOTE_USER;
|
||||
$username = get_env("REMOTE_USER");
|
||||
$homedir = "/home/$username";
|
||||
|
||||
if (!ereg('^[^./][^/]*$', $userfile))
|
||||
|
|
|
@ -390,7 +390,7 @@ echo "$file_to_delete has been deleted!";
|
|||
<title>More secure file name checking</title>
|
||||
<programlisting role="php">
|
||||
<?php
|
||||
$username = $HTTP_REMOTE_USER;
|
||||
$username = get_env("REMOTE_USER");
|
||||
$homedir = "/home/$username";
|
||||
|
||||
if (!ereg('^[^./][^/]*$', $userfile))
|
||||
|
|
Loading…
Reference in a new issue