[Mimedefang] MIME::Parser in 5.414
David F. Skoll
dfs at roaringpenguin.com
Tue Oct 19 17:17:37 EDT 2004
On Tue, 19 Oct 2004, Staggs Mark - mstagg wrote:
> I'm using SOAP::Lite (which in turn uses MIME::Parser) with the newest
> version of MIME::Tools. In MIME::Parser.pm at line 789 the line was changed
> to
> $ENCODED->flush or die ...;
> In this case $ENCODED is an IO::ScalarArray whose flush is a no-op and
> returns nothing (sub flush{}). This causes the module to die unnecessarily.
This is IMO a bug in IO::ScalarArray, which should return "0 but true"
for flush.
> Can this be changed in future versions to not die and/or check for
> ScalarArray type and not flush?
Well, I suppose it could, but there's nothing to stop someone from
subclassing another class of IO::Handle and mis-implementing flush().
This is a really nasty problem, because in many cases, it's a security
risk *not* to check that flush() succeeds. I don't know of a clean
way to fix this (other than asking the Perl gods to fix
IO::ScalarArray::flush.)
Let me think about it a while.
Regards,
David.
More information about the MIMEDefang
mailing list