Merge pull request #2102 from patschi/patch-3

[web] Duplicating DKIM key corrupts private key
master
André Peters 2018-12-18 20:51:11 +01:00 committed by GitHub
commit 5ade95a818
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -123,7 +123,7 @@ function dkim($_action, $_data = null) {
try {
$redis->hSet('DKIM_PUB_KEYS', $to_domain, $from_domain_dkim['pubkey']);
$redis->hSet('DKIM_SELECTORS', $to_domain, $from_domain_dkim['dkim_selector']);
$redis->hSet('DKIM_PRIV_KEYS', $from_domain_dkim['dkim_selector'] . '.' . $to_domain, trim($from_domain_dkim['privkey']));
$redis->hSet('DKIM_PRIV_KEYS', $from_domain_dkim['dkim_selector'] . '.' . $to_domain, base64_decode(trim($from_domain_dkim['privkey'])));
}
catch (RedisException $e) {
$_SESSION['return'][] = array(
@ -307,4 +307,4 @@ function dkim($_action, $_data = null) {
}
break;
}
}
}