mirror of
https://github.com/jcampbell1/simple-file-manager.git
synced 2025-02-20 22:00:04 +01:00
making a password easier to implement
This commit is contained in:
@@ -15,11 +15,10 @@ $allow_create_folder = true; // Set to false to disable folder creation
|
||||
$allow_upload = true; // Set to true to allow upload files
|
||||
$allow_direct_link = true; // Set to false to only allow downloads and not direct link
|
||||
|
||||
$PASSWORD = ''; // Set the password, to access the file manager... (optional)
|
||||
|
||||
/* Uncomment section below, if you want a trivial password protection */
|
||||
if($PASSWORD) {
|
||||
|
||||
/*
|
||||
$PASSWORD = 'sfm';
|
||||
session_start();
|
||||
if(!$_SESSION['_sfm_allowed']) {
|
||||
// sha1, and random bytes to thwart timing attacks. Not meant as secure hashing.
|
||||
@@ -31,7 +30,7 @@ if(!$_SESSION['_sfm_allowed']) {
|
||||
echo '<html><body><form action=? method=post>PASSWORD:<input type=password name=p /></form></body></html>';
|
||||
exit;
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
// must be in UTF-8 or `basename` doesn't work
|
||||
setlocale(LC_ALL,'en_US.UTF-8');
|
||||
|
||||
Reference in New Issue
Block a user