Cwd::fast_abs_path's untaint should allow for multiline directories
authorJoel Berger <joel.a.berger@gmail.com>
Sat, 1 Dec 2012 16:15:36 +0000 (10:15 -0600)
committerFather Chrysostomos <sprout@cpan.org>
Mon, 3 Dec 2012 16:53:45 +0000 (08:53 -0800)
commit9f28c6384ccf40ab7e158f98d343a59c296c6074
tree2245f43c7086802e5fc6d0ca19a3ed35050ba7cd
parent52ee8d0ab0016f47e2280ef34ee0f8e2d7ee2590
Cwd::fast_abs_path's untaint should allow for multiline directories

This bug was noticed via https://github.com/dagolden/file-chdir/issues/3 and testing has led to this being the cause.
The problem is worse on some platforms (notably cygwin in this case) when abs_path is implemented by fast_abs_path.
Since File::chdir tests for proper behavior when a directory contains a newline, this bug then breaks File::chdir (one of my favorites and very useful xplatform tool).

Yes this should have tests, but since it will involve creating a directory with a newline, I thought I would do better to leave that to someone with better knowledge than I.
dist/Cwd/Cwd.pm