From: Blackeye Date: Wed, 4 Feb 2026 00:47:30 +0000 (+0100) Subject: pat pat - ci linting X-Git-Tag: 4.7.2~10^2~4 X-Git-Url: https://git.p6c8.net/jirafeau/pcanterino.git/commitdiff_plain/404c669c9226d66ca1189534ad4c1da8e2f165f9?ds=sidebyside pat pat - ci linting --- diff --git a/f.php b/f.php index 92736f7..f0a3d12 100644 --- a/f.php +++ b/f.php @@ -171,7 +171,7 @@ if (!empty($link['key'])) { require(JIRAFEAU_ROOT.'lib/template/footer.php'); exit; } else { - if (hash_equals($link['key'], hash('sha256',$_POST['key']))) { + if (hash_equals($link['key'], hash('sha256', $_POST['key']))) { $password_challenged = true; } else { sleep(2); diff --git a/lib/functions.php b/lib/functions.php index f55da7b..3811544 100644 --- a/lib/functions.php +++ b/lib/functions.php @@ -544,7 +544,7 @@ function jirafeau_add_file($file, $one_time_download, $key, $time, $ip, $crypt, /* hash password or empty. */ $password = ''; if (!empty($key)) { - $password = hash('sha256',$key); + $password = hash('sha256', $key); } /* create link file */ @@ -1091,7 +1091,7 @@ function jirafeau_async_init($filename, $type, $one_time, $key, $time, $ip) /* sha256 password or empty */ $password = ''; if (!empty($key)) { - $password = hash('sha256',$key); + $password = hash('sha256', $key); } /* Store information. */ @@ -1379,7 +1379,7 @@ function jirafeau_decrypt_file_legacy($fp_src, $fp_dst, $k) $m = mcrypt_module_open('rijndael-256', '', 'ofb', ''); /* Extract key and iv. */ $crypt_key = $k; - $hash_key = hash('sha256',$crypt_key); + $hash_key = hash('sha256', $crypt_key); $iv = jirafeau_crypt_create_iv($hash_key, mcrypt_enc_get_iv_size($m)); /* Init module. */ mcrypt_generic_init($m, $hash_key, $iv); @@ -1642,7 +1642,7 @@ function jirafeau_escape($string) function jirafeau_admin_session_start() { $_SESSION['admin_auth'] = true; - $_SESSION['admin_csrf'] = hash('sha256',uniqid(mt_rand(), true)); + $_SESSION['admin_csrf'] = hash('sha256', uniqid(mt_rand(), true)); } function jirafeau_session_end() diff --git a/script.php b/script.php index d28bc02..301ebe8 100644 --- a/script.php +++ b/script.php @@ -183,7 +183,7 @@ if (isset($_FILES['file']) && is_writable(VAR_FILES) echo 'Error 9'; exit; } - if (strlen($link['key']) > 0 && hash('sha256',$key) != $link['key']) { + if (strlen($link['key']) > 0 && hash('sha256', $key) != $link['key']) { sleep(2); echo 'Error 10'; exit;