Permalink
Browse files

Configure password hashing for installation

Refs #1069.
  • Loading branch information...
franzliedke committed Jan 6, 2019
1 parent 9e32824 commit de16e3e414070923f1a410de5805e46db3dcdd56
Showing with 1 addition and 0 deletions.
  1. +1 −0 install.php
@@ -1493,6 +1493,7 @@ function process_form(the_form)
$db->query('INSERT INTO '.$db_prefix.'users (group_id, username, password, email) VALUES(3, \''.$db->escape($lang_install['Guest']).'\', \''.$db->escape($lang_install['Guest']).'\', \''.$db->escape($lang_install['Guest']).'\')')
or error('Unable to add guest user. Please check your configuration and try again', __FILE__, __LINE__, $db->error());
$password_hash_cost = 10;
$db->query('INSERT INTO '.$db_prefix.'users (group_id, username, password, email, language, style, num_posts, last_post, registered, registration_ip, last_visit) VALUES(1, \''.$db->escape($username).'\', \''.$db->escape(flux_password_hash($password1)).'\', \''.$email.'\', \''.$db->escape($default_lang).'\', \''.$db->escape($default_style).'\', 1, '.$now.', '.$now.', \''.$db->escape(get_remote_address()).'\', '.$now.')')
or error('Unable to add administrator user. Please check your configuration and try again', __FILE__, __LINE__, $db->error());

0 comments on commit de16e3e

Please sign in to comment.