#9143 Fixed empty license encryption key
This commit is contained in:
parent
197fa4c69a
commit
c650e7df6c
|
@ -78,8 +78,7 @@ if ($update_settings) {
|
|||
|
||||
$customer_key = $_POST['keys']['customer_key'];
|
||||
|
||||
$license_encryption_key = get_parameter('license_encryption_key', false);
|
||||
if ($license_encryption_key !== false) {
|
||||
$license_encryption_key = get_parameter('license_encryption_key', '');
|
||||
$check = db_get_value_sql('SELECT `key` FROM tupdate_settings WHERE `key` LIKE "license_encryption_key"');
|
||||
if ($check === false) {
|
||||
db_process_sql_insert(
|
||||
|
@ -97,6 +96,7 @@ if ($update_settings) {
|
|||
);
|
||||
}
|
||||
|
||||
if (empty($license_encryption_key) === false) {
|
||||
$customer_key = openssl_blowfish_encrypt_hex($customer_key, io_safe_output($license_encryption_key));
|
||||
}
|
||||
|
||||
|
|
|
@ -14752,7 +14752,7 @@ function api_set_metaconsole_license_file($key)
|
|||
}
|
||||
|
||||
$license_encryption_key = db_get_value('value', 'tupdate_settings', '`key`', 'license_encryption_key');
|
||||
if ($license_encryption_key !== false) {
|
||||
if (empty($license_encryption_key) === false) {
|
||||
$key = openssl_blowfish_encrypt_hex($key, io_safe_output($license_encryption_key));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue