From: Patrick Canterino Date: Wed, 12 Aug 2026 11:25:44 +0000 (+0200) Subject: Merge branch 'next-release' into 'next-release' X-Git-Tag: 4.8.0~17 X-Git-Url: https://git.p6c8.net/jirafeau/jirafeau.git/commitdiff_plain/f163f30e032ceb21fec3f4f37360ccc8975696a5?hp=46cccd7a3a59bb632e543213e50801c5383cc097 Merge branch 'next-release' into 'next-release' Promoting MR 35 to Next-Rrelease Except the Password Hashing that is Already Implemented See merge request jirafeau/Jirafeau!37 --- diff --git a/f.php b/f.php index 870b4bd..3523596 100644 --- a/f.php +++ b/f.php @@ -36,7 +36,7 @@ if (!isset($_GET['h']) || empty($_GET['h'])) { $link_name = $_GET['h']; -if (!preg_match('/[0-9a-zA-Z_-]+$/', $link_name)) { +if (!preg_match('/^[0-9a-zA-Z_-]+$/', $link_name)) { require(JIRAFEAU_ROOT.'lib/template/header.php'); echo '

' . t('FILE_404') . '

'; require(JIRAFEAU_ROOT.'lib/template/footer.php'); @@ -82,7 +82,7 @@ if (!file_exists(VAR_FILES . $p . $link['hash'])) { exit; } -if (!empty($delete_code) && $delete_code == $link['link_code']) { +if (!empty($delete_code) && hash_equals((string) $link['link_code'], (string) $delete_code)) { require(JIRAFEAU_ROOT.'lib/template/header.php'); if (isset($_POST['do_delete'])) { jirafeau_delete_link($link_name); diff --git a/index.php b/index.php index 82b3c8c..d60cb18 100644 --- a/index.php +++ b/index.php @@ -158,7 +158,7 @@ if ($cfg['download_password_requirement'] === 'generated') { echo ''; echo ' " size = "40" /> | '; - echo ' ' . t('DESIGNED') . ' ' . $cfg['organisation']; + echo ' ' . t('DESIGNED') . ' ' . jirafeau_escape($cfg['organisation']); } echo ' | '; diff --git a/lib/template/header.php b/lib/template/header.php index 93f7e18..c1a94de 100644 --- a/lib/template/header.php +++ b/lib/template/header.php @@ -6,10 +6,10 @@ header('x-ua-compatible: ie=edge'); - <?php echo (true === empty($cfg['title'])) ? t('JI_WEB_RE') : $cfg['title']; ?> + <?php echo (true === empty($cfg['title'])) ? t('JI_WEB_RE') : jirafeau_escape($cfg['title']); ?> - - + + @@ -17,6 +17,6 @@ header('x-ua-compatible: ie=edge');

- +

diff --git a/script.php b/script.php index 301ebe8..2fc297f 100644 --- a/script.php +++ b/script.php @@ -163,7 +163,7 @@ if (isset($_FILES['file']) && is_writable(VAR_FILES) $d = $_GET['d']; } - if (!preg_match('/[0-9a-zA-Z_-]+$/', $link_name)) { + if (!preg_match('/^[0-9a-zA-Z_-]+$/', $link_name)) { echo 'Error 7'; exit; }