[Koha-bugs] [Bug 28230] Renewing/Checking out record with AE or OE letter in title can make Koha totally unfunctional

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Apr 27 10:07:06 CEST 2021


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28230

--- Comment #9 from Joonas Kylmälä <joonas.kylmala at helsinki.fi> ---
(In reply to Jonathan Druart from comment #7)
> I was going to attach this patch:
> 
> diff --git a/C4/Message.pm b/C4/Message.pm
> index 659ff96aeb2..d9bb945abb6 100644
> --- a/C4/Message.pm
> +++ b/C4/Message.pm
> @@ -283,7 +283,7 @@ sub metadata {
>          $self->content($self->render_metadata);
>          return $data;
>      } else {
> -        return YAML::XS::Load(Encode::encode_utf8($self->{metadata}));
> +        return YAML::XS::Load($self->{metadata});
>      }
>  }

Why I didn't do this is because to me it looks to be incorrect in this
scenario:

1. Load the object with find_last_message() -> metadata is now perl string
2. Call $message->append() -> it then calls my $metadata = $self->metadata; and
we would be calling 

> +        return YAML::XS::Load($self->{metadata});

which means we are calling Load() with a Perl string and not UTF-8 octets which
is wrong.

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.


More information about the Koha-bugs mailing list