tarao / perl5-HTML-ExtractContent

Other
1 stars 1 forks source link

Uses File::Slurp, known to be buggy and vulnerable #1

Open karenetheridge opened 9 years ago

karenetheridge commented 9 years ago

e.g. look at https://rt.cpan.org/Ticket/Display.html?id=83126 and be dismayed

File::Slurp::Tiny and Path::Tiny are both excellent alternatives. See also http://shadow.cat/blog/matt-s-trout/mstpan-5/

sdondley commented 4 years ago

I think the File::Slurp module has gotten tightened up quite a bit over last 5 years.

karenetheridge commented 4 years ago

No, File::Slurp still has (and will always have) serious issues with no workarounds, and is best replaced.

sdondley commented 4 years ago

What do you recommend instead? How about https://metacpan.org/pod/File::Slurper?

karenetheridge commented 4 years ago

See the first post in this GHI. File::Slurper came later and is better than File::Slurp::Tiny -- it doesn't have a direct correspondence with the File::Slurp API (which File::Slurp::Tiny does), but that's ok because the API was part of the problem (assuming binmodes etc). Path::Tiny contains pretty much everything you'll ever need to do with a file and is very well-maintained -- it's what I use nearly everywhere.