mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 16:55:05 +02:00
Merge branch '2730-Fallo-políticas-desde-la-meta3' into 'develop'
Fixed bug in deleted policies See merge request artica/pandorafms!1934
This commit is contained in:
commit
1698f663a5
@ -1377,7 +1377,7 @@ function is_management_allowed($hkey = '') {
|
||||
global $config;
|
||||
return ( (is_metaconsole() && $config["centralized_management"])
|
||||
|| (!is_metaconsole() && !$config["centralized_management"])
|
||||
|| (!is_metaconsole() && $config["centralized_management"]) && $hkey == hash('sha256', db_get_value ('value', 'tupdate_settings', 'token', 'customer_key')));
|
||||
|| (!is_metaconsole() && $config["centralized_management"]) && $hkey == generate_hash_to_api());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -3388,4 +3388,8 @@ function validate_csrf_code() {
|
||||
return isset($code) && isset($_SESSION['csrf_code'])
|
||||
&& $_SESSION['csrf_code'] == $code;
|
||||
}
|
||||
|
||||
function generate_hash_to_api(){
|
||||
hash('sha256', db_get_value ('value', 'tupdate_settings', '`key`', 'customer_key'));
|
||||
}
|
||||
?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user