X-Git-Url: https://git.p6c8.net/jirafeau_project.git/blobdiff_plain/9cb2631b8ac5fd7c0de6df67d259209eece25305..cf120158b2cde0b407d7f4489abb611a8a43088a:/admin.php?ds=sidebyside diff --git a/admin.php b/admin.php index d3a069c..4a3d25f 100644 --- a/admin.php +++ b/admin.php @@ -65,8 +65,7 @@ if (php_sapi_name() == "cli") { } /* Test web password authentification. */ else if (!empty($cfg['admin_password']) && isset($_POST['admin_password'])) { - if ($cfg['admin_password'] === $_POST['admin_password'] || - $cfg['admin_password'] === hash('sha256', $_POST['admin_password'])) { + if ($cfg['admin_password'] === hash('sha256', $_POST['admin_password'])) { jirafeau_admin_session_start(); } else { require(JIRAFEAU_ROOT . 'lib/template/header.php'); @@ -85,13 +84,14 @@ if (php_sapi_name() == "cli") { + + - @@ -255,7 +255,12 @@ if (php_sapi_name() == "cli") { header('Content-Disposition: attachment; filename="' . $l['file_name'] . '"'); if (file_exists(VAR_FILES . $p . $l['md5'])) { - readfile(VAR_FILES . $p . $l['md5']); + $r = fopen(VAR_FILES . $p . $l['md5'], 'r'); + while (!feof($r)) { + print fread($r, 1024); + ob_flush(); + } + fclose($r); } exit; }