5. Follow the installation wizard, it should propose you the same data folder or even update automatically
6. Check your `/lib/config.local.php` and compare it with the `/lib/config.original.php` to see if new configuration items are available. If a new item is missing in your `config.local.php`, this may trigger some errors as Jirafeau may expect to have them.
+## Version 4.7.x (not yet released)
+
+- ...
+
## Version 4.7.2
- Added a button for showing the download password before uploading the file
$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 '<div class="error"><p>' . t('FILE_404') . '</p></div>';
require(JIRAFEAU_ROOT.'lib/template/footer.php');
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);
echo '<tr><td><label for="input_key">' . t('PSW') . ':' . '</label></td>';
echo '<td class="passwordcolumn"><input type="password" name="key" id="input_key" autocomplete = "new-password"';
if ($cfg['download_password_policy'] === 'regex') {
- echo ' pattern="' . substr($cfg['download_password_policy_regex'], 1, strlen($cfg['download_password_policy_regex']) - 2) . '"'; //remove php delimiters
+ echo ' pattern="' . jirafeau_escape(substr($cfg['download_password_policy_regex'], 1, strlen($cfg['download_password_policy_regex']) - 2)) . '"'; //remove php delimiters
}
if ($cfg['download_password_requirement'] === 'required') {
echo ' required';
?></label></td>
<td class = "field"><input type = "text" name = "web_root"
id = "input_web_root" value = "<?php
- echo(empty($cfg['web_root']) ? jirafeau_default_web_root() : $cfg['web_root']);
+ echo htmlspecialchars(empty($cfg['web_root']) ? jirafeau_default_web_root() : $cfg['web_root'], ENT_QUOTES);
?>" size = "40" /></td>
</tr> <tr> <td class = "info" colspan = "2"><?php
echo t('DATA_DIR_EXPLAINATION');
}
echo JIRAFEAU_ROOT . $var . '/';
} else {
- echo $cfg['var_root'];
+ echo htmlspecialchars($cfg['var_root'], ENT_QUOTES);
}
?>" size = "40" /></td>
</tr> <tr> <td colspan = "2"><input type = "submit"
/* Jirafeau package */
define('JIRAFEAU_PACKAGE', 'Jirafeau');
-define('JIRAFEAU_VERSION', '4.7.2');
+define('JIRAFEAU_VERSION', '4.7.x-dev');
define('JIRAFEAU_WEBSITE', 'https://gitlab.com/jirafeau/Jirafeau');
if (false === empty($cfg['installation_done'])) {
if(false === empty($cfg['organisation'])) {
echo ' <span>|</span> ';
- echo ' ' . t('DESIGNED') . ' ' . $cfg['organisation'];
+ echo ' ' . t('DESIGNED') . ' ' . jirafeau_escape($cfg['organisation']);
}
echo ' <span>|</span> ';
<html>
<head>
<meta charset="utf-8">
- <title><?php echo (true === empty($cfg['title'])) ? t('JI_WEB_RE') : $cfg['title']; ?></title>
+ <title><?php echo (true === empty($cfg['title'])) ? t('JI_WEB_RE') : jirafeau_escape($cfg['title']); ?></title>
<meta name="viewport" content="width=device-width, initial-scale=1">
- <link id="shortcut_icon" rel="shortcut icon" href="<?php echo 'media/' . $cfg['style'] . '/favicon.ico'; ?>">
- <link id="stylesheet" rel="stylesheet" href="<?php echo 'media/' . $cfg['style'] . '/style.css.php'; ?>" type="text/css" />
+ <link id="shortcut_icon" rel="shortcut icon" href="<?php echo jirafeau_escape('media/' . $cfg['style'] . '/favicon.ico'); ?>">
+ <link id="stylesheet" rel="stylesheet" href="<?php echo jirafeau_escape('media/' . $cfg['style'] . '/style.css.php'); ?>" type="text/css" />
</head>
<body>
<script type="text/javascript" src="<?php echo 'lib/functions.js.php'; ?>"></script>
<div id="content">
<h1>
<a href="./">
- <?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']); ?>
</a>
</h1>
$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;
}