Update security.php

This commit is contained in:
Namhyeon Go 2019-05-11 15:24:56 +09:00 committed by GitHub
parent bd0055740a
commit d0f4dca65f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -253,13 +253,11 @@ if(!check_function_exists("get_hashed_text")) {
if(!check_function_exists("get_salt")) { if(!check_function_exists("get_salt")) {
function get_salt() { function get_salt() {
$config = get_config();
$salt = ""; $salt = "";
if(!array_key_empty("salt", $config)) {
$salt = $config['salt']; $config = get_config();
} else { if(!array_key_equals("saltenable", $config, 1)) {
$salt = make_random_id(16); $salt = get_value_in_array("salt", $config, make_random_id(16));
} }
return $salt; return $salt;