Subject: | Security hole with encoding(UTF-8) |
sysread treats any :encoding(...) as effectively :utf8.
Thus, requesting { binmode => ":encoding(UTF-8)" } (e.g. strict UTF-8
compliance) actually results in Perl's lax, insecure utf8 decoding being
used instead.
This may surprise people. (There are related tickets relating to layer
surprises.)
I would suggest improving the documentation to indicate that using any
binmode with File::Slurp other than ":raw" (or ":unix") is ill advised
and the only real reason to use binmode at all is to disable CRLF
translation on Windows.