Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Obfuscate cookie #248

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/lib/Conf.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2368,6 +2368,18 @@ sub _save_binary_cache {
}
return undef;
}
eval { chmod(0640, $param->{'target_file'}); };
if ($EVAL_ERROR) {
$log->syslog(
'err',
'Failed to change mode of the binary file %s. error: %s',
$param->{'target_file'}, $EVAL_ERROR
);
unless ($lock_fh->close()) {
return undef;
}
return undef;
}
unless ($lock_fh->close()) {
return undef;
}
Expand Down
1 change: 1 addition & 0 deletions src/lib/Sympa/ConfDef.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1238,6 +1238,7 @@ our @params = (
'sample' => '123456789',
'gettext_id' => 'Secret string for generating unique keys',
'file' => 'sympa.conf',
'obfuscated' => '1',
'gettext_comment' =>
"This allows generated authentication keys to differ from a site to another. It is also used for encryption of user passwords stored in the database. The presence of this string is one reason why access to \"sympa.conf\" needs to be restricted to the \"sympa\" user.\nNote that changing this parameter will break all HTTP cookies stored in users' browsers, as well as all user passwords and lists X509 private keys. To prevent a catastrophe, Sympa refuses to start if this \"cookie\" parameter was changed.",
'optional' => '1',
Expand Down