From 92cdd4cc7f6955760236e134126d8a68efa13360 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Wed, 12 Feb 2020 19:21:35 +0100 Subject: hand-picked changes for better password functions from tyzoids branch --- db_update.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'db_update.php') diff --git a/db_update.php b/db_update.php index 2964bf3..b26bd93 100644 --- a/db_update.php +++ b/db_update.php @@ -9,7 +9,7 @@ // The FluxBB version this script updates to define('UPDATE_TO', '1.5.11'); -define('UPDATE_TO_DB_REVISION', 21); +define('UPDATE_TO_DB_REVISION', 22); define('UPDATE_TO_SI_REVISION', 2); define('UPDATE_TO_PARSER_REVISION', 2); @@ -704,6 +704,10 @@ switch ($stage) $db->alter_field('users', 'jabber', 'VARCHAR(80)', true) or error('Unable to alter jabber field', __FILE__, __LINE__, $db->error()); $db->alter_field('users', 'msn', 'VARCHAR(80)', true) or error('Unable to alter msn field', __FILE__, __LINE__, $db->error()); $db->alter_field('users', 'activate_string', 'VARCHAR(80)', true) or error('Unable to alter activate_string field', __FILE__, __LINE__, $db->error()); + + // Make password field VARCHAR(255) to support password_hash + // 255 is recommended by the PHP manual: http://php.net/manual/en/function.password-hash.php + $db->alter_field('users', 'password', 'VARCHAR(255)', false) or error('Unable to alter password field', __FILE__, __LINE__, $db->error()); // Make all IP fields VARCHAR(39) to support IPv6 $db->alter_field('posts', 'poster_ip', 'VARCHAR(39)', true) or error('Unable to alter poster_ip field', __FILE__, __LINE__, $db->error()); -- cgit v1.2.3-54-g00ecf