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

(-)a/Koha/XSLT/Security.pm (-2 / +2 lines)
Lines 55-60 sub new { Link Here
55
    my ($class) = @_;
55
    my ($class) = @_;
56
    my $self = {};
56
    my $self = {};
57
57
58
    $self->{_options} = {};
58
    my $conf = C4::Context->config('koha_xslt_security');
59
    my $conf = C4::Context->config('koha_xslt_security');
59
    if( $conf && ref($conf) eq 'HASH' ) {
60
    if( $conf && ref($conf) eq 'HASH' ) {
60
        $self->{_options} = $conf;
61
        $self->{_options} = $conf;
Lines 142-152 sub set_callbacks { Link Here
142
sub set_parser_options {
143
sub set_parser_options {
143
    my ($self, $parser) = @_;
144
    my ($self, $parser) = @_;
144
    my $conf = $self->{_options};
145
    my $conf = $self->{_options};
145
    return if !$conf;
146
146
147
    if( $conf->{expand_entities} ) {
147
    if( $conf->{expand_entities} ) {
148
        _set_option($parser, 'expand_entities', 1);
148
        _set_option($parser, 'expand_entities', 1);
149
    } else {
149
    } else {
150
        # If not explicitly set, we should disable expanding for security
150
        _set_option($parser, 'expand_entities', 0);
151
        _set_option($parser, 'expand_entities', 0);
151
    }
152
    }
152
}
153
}
153
- 

Return to bug 23290