View | Details | Raw Unified | Return to bug 33934
Collapse All | Expand All

(-)a/Koha/Encryption.pm (-4 / +6 lines)
Lines 54-65 It's based on Crypt::CBC Link Here
54
54
55
sub new {
55
sub new {
56
    my ( $class ) = @_;
56
    my ( $class ) = @_;
57
    my $key = C4::Context->config('encryption_key');
57
    my $encryption_key = C4::Context->config('encryption_key');
58
    if( !$key ) {
58
    if ( !$encryption_key || $encryption_key eq '__ENCRYPTION_KEY__') {
59
        Koha::Exceptions::MissingParameter->throw('No encryption_key in koha-conf.xml');
59
        Koha::Exceptions::MissingParameter->throw(
60
            q{No encryption_key in koha-conf.xml. Please generate a key. We recommend one of at least 32 bytes. (You might use 'pwgen 32' to do so.)}
61
        );
60
    }
62
    }
61
    return $class->SUPER::new(
63
    return $class->SUPER::new(
62
        -key    => $key,
64
        -key    => $encryption_key,
63
        -cipher => 'Cipher::AES'
65
        -cipher => 'Cipher::AES'
64
    );
66
    );
65
}
67
}
(-)a/about.pl (-2 / +2 lines)
Lines 281-287 if ( ! C4::Context->config('tmp_path') ) { Link Here
281
    }
281
    }
282
}
282
}
283
283
284
if( ! C4::Context->config('encryption_key') ) {
284
my $encryption_key = C4::Context->config('encryption_key');
285
if ( !$encryption_key || $encryption_key eq '__ENCRYPTION_KEY__') {
285
    push @xml_config_warnings, { error => 'encryption_key_missing' };
286
    push @xml_config_warnings, { error => 'encryption_key_missing' };
286
}
287
}
287
288
288
- 

Return to bug 33934