Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Taint bug in File::Find? #911

p5pRT opened this issue Dec 3, 1999 · 1 comment

Taint bug in File::Find? #911

p5pRT opened this issue Dec 3, 1999 · 1 comment


Copy link

p5pRT commented Dec 3, 1999

Migrated from (status was 'resolved')

Searchable as RT1846$

Copy link

p5pRT commented Dec 3, 1999


$ perl -Twl -MFile​::Find -e 'delete $ENV{ENV}; $ENV{PATH} =
"/bin​:/usr/bin"; sub foo { print "wee​: $_"; } ($x) = ($ARGV[0] =~
/^(.*)/); find( \&foo, $x);' .

<prints all the filenames underneath this directory>
Insecure dependency in chdir while running with -T switch at
/usr/lib/perl/File/ line 133.

  My system information is enclosed below. Anyhow, without
further ado, a tiny but useful patch​:

*** Fri Dec 3 00​:34​:46 1999
--- Fri Dec 3 00​:36​:32 1999
*** 87,92 ****
--- 87,94 ----
  my $wanted = shift;
  my $bydepth = $wanted->{bydepth};
  my $cwd = $bydepth ? Cwd​::fastcwd() : Cwd​::cwd();
+ $cwd = $1 if $cwd =~ /^(.*)/;
  # Localize these rather than lexicalizing them for backwards
  # compatibility.

  (And while we're on the subject, perlbug wasn't working when I
tried to write this... it just asked me for a subject and froze. Oh,
well, I'll look at it later.)

Dennis Taylor "Anyone whose days are all the same and free from
dennis@​ want inhabits eternity of a sort." - Peter Hoeg
  PGP Fingerprint​: E8D6 9670 4FBD EEC3 6C6B 810B 2B30 E529 51BD 7B90

Site configuration information for perl 5.00503​:

Configured by root at Sun May 9 23​:28​:38 EDT 1999.

Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration​:
  osname=linux, osvers=2.2.6, archname=i686-linux
  uname='linux 2.2.6 #4 tue apr 20 02​:59​:44
edt 1999 i686 unknown '
  hint=recommended, useposix=true, d_sigaction=define
  usethreads=undef useperlio=undef d_sfio=undef
  cc='cc', optimize='-O2', gccversion=
  cppflags='-Dbool=char -DHAS_BOOL -I/usr/local/include'
  ccflags ='-Dbool=char -DHAS_BOOL -I/usr/local/include'
  stdchar='char', d_stdstdio=define, usevfork=false
  intsize=4, longsize=4, ptrsize=4, doublesize=8
  d_longlong=define, longlongsize=8, d_longdbl=define,
  alignbytes=4, usemymalloc=n, prototype=define
  Linker and Libraries​:
  ld='cc', ldflags =' -L/usr/local/lib'
  libpth=/usr/local/lib /lib /usr/lib
  libs=-lnsl -lndbm -lgdbm -ldb -ldl -lm -lc -lposix -lcrypt
  libc=, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking​:
  dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef,
  cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'

Locally applied patches​:

@​INC for perl 5.00503​:

Environment for perl 5.00503​:
  LANG (unset)
  LANGUAGE (unset)
  LOGDIR (unset)
  PERL_BADLANG (unset)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

1 participant