aboutsummaryrefslogtreecommitdiff
path: root/public/install.php
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2013-11-15 22:32:57 +0100
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2013-11-16 10:31:06 +0100
commit8e8f7254cae079cc791de99eafa477ff53eb8351 (patch)
tree57a05a819166008f48ef3f51648e80f3576ea743 /public/install.php
parent86a191f185398c309249447286c904863008da78 (diff)
Suppression du champs "sel" lors de l'installation
Génération d'un sel basé sur le temps à la place. Pas parfait mais sûrement suffisant pour FreshRSS
Diffstat (limited to 'public/install.php')
-rw-r--r--public/install.php14
1 files changed, 4 insertions, 10 deletions
diff --git a/public/install.php b/public/install.php
index 0dfe77c57..07e18dd37 100644
--- a/public/install.php
+++ b/public/install.php
@@ -140,13 +140,13 @@ function saveLanguage () {
}
function saveStep2 () {
if (!empty ($_POST)) {
- if (empty ($_POST['sel']) ||
- empty ($_POST['title']) ||
+ if (empty ($_POST['title']) ||
empty ($_POST['old_entries'])) {
return false;
}
- $_SESSION['sel'] = addslashes ($_POST['sel']);
+ $first_sel = small_hash (time ());
+ $_SESSION['sel'] = small_hash (time () . $first_sel) . $first_sel;
$_SESSION['base_url'] = addslashes ($_POST['base_url']);
$_SESSION['title'] = addslashes ($_POST['title']);
$_SESSION['old_entries'] = $_POST['old_entries'];
@@ -484,17 +484,11 @@ function printStep2 () {
<form action="index.php?step=2" method="post">
<legend><?php echo _t ('general_configuration'); ?></legend>
- <div class="form-group">
- <label class="group-name" for="sel"><?php echo _t ('random_string'); ?></label>
- <div class="group-controls">
- <input type="text" id="sel" name="sel" value="<?php echo isset ($_SESSION['sel']) ? $_SESSION['sel'] : '123~abcdefghijklmnopqrstuvwxyz~321'; ?>" /> <i class="icon i_help"></i> <?php echo _t ('change_value'); ?>
- </div>
- </div>
-
<?php
$url = substr ($_SERVER['PHP_SELF'], 0, -10);
?>
<div class="form-group" style="display:none">
+ <!-- TODO: if no problem during version 0.6, remove for version 0.7 -->
<label class="group-name" for="base_url"><?php echo _t ('base_url'); ?></label>
<div class="group-controls">
<input type="text" id="base_url" name="base_url" value="<?php echo isset ($_SESSION['base_url']) ? $_SESSION['base_url'] : $url; ?>" /> <i class="icon i_help"></i> <?php echo _t ('do_not_change_if_doubt'); ?>