summaryrefslogtreecommitdiff
path: root/install.php
diff options
context:
space:
mode:
authorczaks <marcin@6irc.net>2016-04-22 05:35:43 +0200
committerczaks <marcin@6irc.net>2016-04-22 05:35:43 +0200
commitcaaf741691c9d44a9a186d6ce924fecb04f4f347 (patch)
tree9b7c250ea732353f8053191b7772b4f6f8dbc7c6 /install.php
parent028fd3df15b2e2edc96c5b84156b0b039ea16562 (diff)
[SECURITY] keep up with modern password hashing standards
Diffstat (limited to 'install.php')
-rw-r--r--install.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/install.php b/install.php
index 95caf8ec..5a2d724a 100644
--- a/install.php
+++ b/install.php
@@ -1,10 +1,12 @@
<?php
// Installation/upgrade file
-define('VERSION', '4.9.93');
+define('VERSION', '5.0.0');
require 'inc/functions.php';
+loadConfig();
+
$step = isset($_GET['step']) ? round($_GET['step']) : 0;
$page = array(
'config' => $config,
@@ -551,6 +553,9 @@ if (file_exists($config['has_installed'])) {
foreach ($boards as &$board) {
query(sprintf('ALTER TABLE ``posts_%s`` ADD `slug` VARCHAR(255) DEFAULT NULL AFTER `embed`;', $board['uri'])) or error(db_error());
}
+ case '4.9.93':
+ query('ALTER TABLE ``mods`` CHANGE `password` `password` VARCHAR(255) NOT NULL;') or error(db_error());
+ query('ALTER TABLE ``mods`` CHANGE `salt` `salt` VARCHAR(64) NOT NULL;') or error(db_error());
case false:
// TODO: enhance Tinyboard -> vichan upgrade path.
query("CREATE TABLE IF NOT EXISTS ``search_queries`` ( `ip` varchar(39) NOT NULL, `time` int(11) NOT NULL, `query` text NOT NULL) ENGINE=MyISAM DEFAULT CHARSET=utf8;") or error(db_error());