Commit 3a500004 authored by sikeda's avatar sikeda
Browse files

[bug] wwsympa and sympa/health_check did not check change of "cookie" parameter.


git-svn-id: https://subversion.renater.fr/sympa/branches/sympa-6.2-branch@12055 05aa8bb8-cd2b-0410-b1d7-8918dfa770ce
parent fc32a742
......@@ -971,8 +971,12 @@ my $maintenance_mode;
unless (Conf::data_structure_uptodate()) {
$maintenance_mode = 1;
$log->syslog('err',
"Web interface set to maintenance mode ; you should run sympa.pl --upgrade"
'WWSympa set to maintenance mode; you should run sympa.pl --upgrade'
);
} elsif (tools::cookie_changed($Conf::Conf{'cookie'})) {
$maintenance_mode = 1;
$log->syslog('err',
'WWSympa set to maintenance mode; sympa.conf/cookie parameter has changed.');
}
 
Sympa::Tools::Password::ciphersaber_installed();
......@@ -1053,6 +1057,7 @@ while ($query = new_loop()) {
## If in maintenance mode, check if the data structure is now uptodate
if ( $maintenance_mode
and Conf::data_structure_uptodate()
and not tools::cookie_changed($Conf::Conf{'cookie'})
and ($EUID eq (getpwnam(Sympa::Constants::USER))[2])) {
$maintenance_mode = undef;
$log->syslog('notice',
......
......@@ -199,6 +199,12 @@ if ($main::options{'upgrade_config_location'}) {
);
}
if (tools::cookie_changed($Conf::Conf{'cookie'})) {
die sprintf
'sympa.conf/cookie parameter has changed. You may have severe inconsitencies into password storage. Restore previous cookie or write some tool to re-encrypt password in database and check spools contents (look at %s/cookies.history file).',
$Conf::Conf{'etc'};
}
## Check database connectivity and probe database
unless (Sympa::DatabaseManager::probe_db()) {
die sprintf
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment