[freeside-commits] branch FREESIDE_3_BRANCH updated. 3347ca190d669bc553888a2fbc88310b82f0eec8
Ivan
ivan at 420.am
Sun May 17 16:25:22 PDT 2015
The branch, FREESIDE_3_BRANCH has been updated
via 3347ca190d669bc553888a2fbc88310b82f0eec8 (commit)
from 529c23d58c97eca1d71df865988def671bfbd2cb (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 3347ca190d669bc553888a2fbc88310b82f0eec8
Author: Ivan Kohler <ivan at freeside.biz>
Date: Sun May 17 16:25:21 2015 -0700
don't look up encryption config every record, RT#28526
diff --git a/FS/FS/Record.pm b/FS/FS/Record.pm
index b1e4a38..72745fe 100644
--- a/FS/FS/Record.pm
+++ b/FS/FS/Record.pm
@@ -73,8 +73,8 @@ FS::UID->install_callback( sub {
$conf = FS::Conf->new;
$conf_encryption = $conf->exists('encryption');
$conf_encryptionmodule = $conf->config('encryptionmodule');
- $conf_encryptionpublickey = $conf->config('encryptionpublickey');
- $conf_encryptionprivatekey = $conf->config('encryptionprivatekey');
+ $conf_encryptionpublickey = join("\n",$conf->config('encryptionpublickey'));
+ $conf_encryptionprivatekey = join("\n",$conf->config('encryptionprivatekey'));
$money_char = $conf->config('money_char') || '$';
my $nw_coords = $conf->exists('geocode-require_nw_coordinates');
$lat_lower = $nw_coords ? 1 : -90;
@@ -3137,14 +3137,12 @@ sub loadRSA {
}
# Initialize Encryption
if ($conf_encryptionpublickey && $conf_encryptionpublickey ne '') {
- my $public_key = join("\n",$conf_encryptionpublickey);
- $rsa_encrypt = $rsa_module->new_public_key($public_key);
+ $rsa_encrypt = $rsa_module->new_public_key($conf_encryptionpublickey);
}
# Intitalize Decryption
if ($conf_encryptionprivatekey && $conf_encryptionprivatekey ne '') {
- my $private_key = join("\n",$conf_encryptionprivatekey);
- $rsa_decrypt = $rsa_module->new_private_key($private_key);
+ $rsa_decrypt = $rsa_module->new_private_key($conf_encryptionprivatekey);
}
}
-----------------------------------------------------------------------
Summary of changes:
FS/FS/Record.pm | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
More information about the freeside-commits
mailing list