Bug fix: During initialization safe_encode_utf8_inplace is called not only for log_templ or log_recip_templ

Patrick Ben Koetter p at sys4.de
Tue Feb 26 14:42:41 CET 2019


Serge,

* Serge Braichuk <braichuk at tut.by>:
> sub init_tokenize_templates(): safe_encode_utf8_inplace is called for ALL templates. After that non-ansi templates can be unreadable (e.g. Russian language templates).

mind to submit your patch to https://gitlab.com/amavis/amavis?

p at rick



> 
> This can be fixed via the following patch:
> 
> diff -du amavisd.orig amavisd
> --- amavisd.orig Tue Apr 26 22:24:33 2016
> +++ amavisd Sat Nov 18 00:40:49 2017
> @@ -12826,7 +12826,7 @@
>        $s = $$s if ref($s) eq 'SCALAR';
>        if (defined $s) {
>          # encode log templates to UTF-8, leave the rest as character strings
> - safe_encode_utf8_inplace($s) if $n eq 'log_templ' || 'log_recip_templ';
> + safe_encode_utf8_inplace($s) if $n eq 'log_templ' || $n eq 'log_recip_templ';
>          $policy_bank{$bank_name}{$n} = tokenize(\$s);
>        }
>      }

-- 
[*] sys4 AG
 
https://sys4.de, +49 (89) 30 90 46 64
Schleißheimer Straße 26/MG,80333 München
 
Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263
Vorstand: Patrick Ben Koetter, Marc Schiffbauer, Wolfgang Stief
Aufsichtsratsvorsitzender: Florian Kirstein
 


More information about the amavis-users mailing list