Merge branch '23.0' of git@github.com:Dolibarr/dolibarr.git into 23.0

This commit is contained in:
Laurent Destailleur 2026-07-18 02:49:17 +02:00
commit b4e5998f2c
2 changed files with 4 additions and 3 deletions

View file

@ -1,5 +1,6 @@
<?php
/* Copyright (C) 2017-2025 Laurent Destailleur <eldy@users.sourcefore.net>
/* Copyright (C) 2017-2025 Laurent Destailleur <eldy@users.sourcefore.net>
* Copyright (C) 2026 Regis Houssin <regis.houssin@inodbox.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -194,7 +195,7 @@ class modBlockedLog extends DolibarrModules
// Add key
$hmac_secret_key = 'BLOCKEDLOGHMAC'.getRandomPassword(true); // This is using random_int for 32 chars
$result = dolibarr_set_const($this->db, 'BLOCKEDLOG_HMAC_KEY', $hmac_secret_key, 'chaine', 0, 'The secret key for HMAC used for blockedlog record', 0); // Will encrypt the value using dolCrypt and store it.
$result = dolibarr_set_const($this->db, 'BLOCKEDLOG_HMAC_KEY', $hmac_secret_key, 'chaine', 0, 'The secret key for HMAC used for blockedlog record', $conf->entity); // Will encrypt the value using dolCrypt and store it.
if ($result < 0) {
dol_print_error($this->db);

View file

@ -5632,7 +5632,7 @@ function migrate_blockedlog_add_hmac_key()
// Add key
$hmac_secret_key = 'BLOCKEDLOGHMAC'.getRandomPassword(true); // This is using random_int for 32 chars
$result = dolibarr_set_const($db, 'BLOCKEDLOG_HMAC_KEY', $hmac_secret_key, 'chaine', 0, 'The secret key for HMAC used for blockedlog record', 0); // Will encrypt the value using dolCrypt and store it.
$result = dolibarr_set_const($db, 'BLOCKEDLOG_HMAC_KEY', $hmac_secret_key, 'chaine', 0, 'The secret key for HMAC used for blockedlog record', $conf->entity); // Will encrypt the value using dolCrypt and store it.
if ($result < 0) {
dol_print_error($db);