Update security.php

This commit is contained in:
Namhyeon Go 2019-05-11 15:30:17 +09:00 committed by GitHub
parent 02ddd9bc1e
commit d6ef1aede2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -266,28 +266,9 @@ if(!check_function_exists("get_salt")) {
if(!check_function_exists("get_password")) {
function get_password($text, $algo="sha1") {
$config = get_config();
$salt = get_salt();
$is_not_supported = false;
$plain_text = $text;
$hashed_text = "";
if(!empty($salt)) {
$plain_text .= $salt;
}
$hashed_text = get_hashed_text($plain_text, $algo);
if(empty($hashed_text)) {
$is_not_supported = true;
}
if($is_not_supported) {
$hashed_text = $plain_text;
}
return $hashed_text;
return get_hashed_text($text, $algo, array(
"salt" => true,
));
}
}