migrate to bcrypt for password storage
This commit is contained in:
@ -91,6 +91,22 @@ class Upgrade extends Extension {
|
||||
log_info("upgrade", "Database at version 12");
|
||||
$config->set_bool("in_upgrade", false);
|
||||
}
|
||||
|
||||
if($config->get_int("db_version") < 13) {
|
||||
$config->set_bool("in_upgrade", true);
|
||||
$config->set_int("db_version", 13);
|
||||
|
||||
log_info("upgrade", "Changing password column to VARCHAR(250)");
|
||||
if($database->get_driver_name() == 'pgsql') {
|
||||
$database->execute("ALTER TABLE users ALTER COLUMN pass SET DATA TYPE VARCHAR(250)");
|
||||
}
|
||||
else if($database->get_driver_name() == 'mysql') {
|
||||
$database->execute("ALTER TABLE users CHANGE pass pass VARCHAR(250)");
|
||||
}
|
||||
|
||||
log_info("upgrade", "Database at version 13");
|
||||
$config->set_bool("in_upgrade", false);
|
||||
}
|
||||
}
|
||||
|
||||
public function get_priority() {return 5;}
|
||||
|
Reference in New Issue
Block a user