diff options
author | Yves Orton <demerphq@gmail.com> | 2022-04-20 06:44:08 +0200 |
---|---|---|
committer | Yves Orton <demerphq@gmail.com> | 2022-04-20 06:45:43 +0200 |
commit | 9eb153ffbbde62558146e8f9b837034f42878e13 (patch) | |
tree | f05d906f05de9116ad1b0b4a6826cf2895ebaec9 /mg.c | |
parent | c2e0d3bb9f0e8d6999bfa6c5d969f505012bcf72 (diff) | |
download | perl-9eb153ffbbde62558146e8f9b837034f42878e13.tar.gz |
Revert "mg.c, Cwd.pm - Empty path is the same as "." which is forbidden under taint"
This reverts commit 5ede4453c4877110eb5214ff400c173210b101b1.
I messed up and pushed it to blead not to the PR branch I meant to push
it. Thanks to xenu for noticing. This needs a smoke before it should be
applied.
Diffstat (limited to 'mg.c')
-rw-r--r-- | mg.c | 12 |
1 files changed, 1 insertions, 11 deletions
@@ -1356,15 +1356,6 @@ Perl_magic_setenv(pTHX_ SV *sv, MAGIC *mg) const char path_sep = ':'; #endif -#ifndef __VMS - /* Does this apply for VMS? - * Empty PATH on linux is treated same as ".", which is forbidden - * under taint. So check if the PATH variable is empty. */ - if (!len) { - MgTAINTEDDIR_on(mg); - return 0; - } -#endif /* set MGf_TAINTEDDIR if any component of the new path is * relative or world-writeable */ while (s < strend) { @@ -1381,8 +1372,7 @@ Perl_magic_setenv(pTHX_ SV *sv, MAGIC *mg) /* Using Unix separator, e.g. under bash, so act line Unix */ || (PL_perllib_sep == ':' && *tmpbuf != '/') #else - || *tmpbuf != '/' /* no starting slash -- assume relative path */ - || s == strend /* trailing empty component -- same as "." */ + || *tmpbuf != '/' /* no starting slash -- assume relative path */ #endif || (PerlLIO_stat(tmpbuf, &st) == 0 && (st.st_mode & 2)) ) { MgTAINTEDDIR_on(mg); |