-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Laurent Destailleur <[email protected]>
- Loading branch information
1 parent
542b4bd
commit 98c9233
Showing
1 changed file
with
9 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
<?php | ||
/* Copyright (C) 2004-2022 Laurent Destailleur <[email protected]> | ||
* Copyright (C) 2005-2007 Regis Houssin <[email protected]> | ||
* Copyright (C) 2013-2015 Juanjo Menent <[email protected]> | ||
* Copyright (C) 2024 MDW <[email protected]> | ||
/* Copyright (C) 2004-2022 Laurent Destailleur <[email protected]> | ||
* Copyright (C) 2005-2007 Regis Houssin <[email protected]> | ||
* Copyright (C) 2013-2015 Juanjo Menent <[email protected]> | ||
* Copyright (C) 2024 MDW <[email protected]> | ||
* Copyright (C) 2024 Frédéric France <[email protected]> | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
|
@@ -114,8 +114,10 @@ | |
} | ||
} elseif ($action == 'disable_encrypt') { | ||
// By default, $allow_disable_encryption is false we do not allow to disable encryption because passwords can't be decoded once encrypted. | ||
// We set entity=0 (all) because DATABASE_PWD_ENCRYPTED is a setup into conf file, so always shared for everybody | ||
if ($allow_disable_encryption) { | ||
dolibarr_del_const($db, "DATABASE_PWD_ENCRYPTED", $conf->entity); | ||
dolibarr_del_const($db, "DATABASE_PWD_ENCRYPTED", 0); | ||
} | ||
} | ||
|
||
|
@@ -125,7 +127,7 @@ | |
sleep(3); // Don't know why but we need to wait file is completely saved before making the reload. Even with flush and clearstatcache, we need to wait. | ||
|
||
// database value not required | ||
//dolibarr_set_const($db, "MAIN_DATABASE_PWD_CONFIG_ENCRYPTED", "1"); | ||
// dolibarr_set_const($db, "MAIN_DATABASE_PWD_CONFIG_ENCRYPTED", "1"); | ||
header("Location: security.php"); | ||
exit; | ||
} else { | ||
|
@@ -137,11 +139,11 @@ | |
sleep(3); // Don't know why but we need to wait file is completely saved before making the reload. Even with flush and clearstatcache, we need to wait. | ||
|
||
// database value not required | ||
//dolibarr_del_const($db, "MAIN_DATABASE_PWD_CONFIG_ENCRYPTED",$conf->entity); | ||
// dolibarr_del_const($db, "MAIN_DATABASE_PWD_CONFIG_ENCRYPTED",$conf->entity); | ||
header("Location: security.php"); | ||
exit; | ||
} else { | ||
//setEventMessages($langs->trans('InstrucToClearPass', $dolibarr_main_db_pass), null, 'warnings'); | ||
// setEventMessages($langs->trans('InstrucToClearPass', $dolibarr_main_db_pass), null, 'warnings'); | ||
setEventMessages($langs->trans('InstrucToClearPass', $langs->transnoentitiesnoconv("DatabasePassword")), null, 'warnings'); | ||
} | ||
} | ||
|