develooper Front page | perl.perl5.porters | Postings from December 2001

[ID 20011225.003] qr// not detainting array or hash slices

Thread Next
From:
schwern
Date:
December 25, 2001 14:29
Subject:
[ID 20011225.003] qr// not detainting array or hash slices
Message ID:
20011225222900.7B4708254@ool-18b93024.dyn.optonline.net

This is a bug report for perl from schwern@pobox.com,
generated with the help of perlbug 1.33 running under perl v5.7.2.


-----------------------------------------------------------------
[Please enter your report here]

qr// does not appear to work for detainting elements of a hash or
array (reference or otherwise), but is ok for scalars.

#!/usr/bin/perl -T

$foo{moo} = $^X;
($cdir) = $foo{moo} =~ qr/^(.*)$/;

print "Tainted\n" unless eval { join('', $cdir), kill 0;  1 };


You get 'Tainted' back from that on all perls from 5.005_03 up.



[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
    category=core
    severity=medium
---
Site configuration information for perl v5.7.2:

Configured by schwern at Tue Dec 18 03:04:36 EST 2001.

Summary of my perl5 (revision 5.0 version 7 subversion 2 patch 13748) configuration:
  Platform:
    osname=linux, osvers=2.4.15-pre5-ben0, archname=ppc-linux-64int
    uname='linux blackrider 2.4.15-pre5-ben0 #2 fri nov 23 13:22:15 est 2001 ppc unknown '
    config_args=''
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=define use64bitall=undef uselongdouble=undef
    usemymalloc=y, bincompat5005=define
  Compiler:
    cc='cc', ccflags ='-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-O3',
    cppflags='-fno-strict-aliasing -I/usr/local/include'
    ccversion='', gccversion='2.95.4 20011006 (Debian prerelease)', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=87654321
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8
    ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lnsl -lgdbm -ldbm -ldb -ldl -lm -lc -lcrypt -lutil
    perllibs=-lnsl -ldl -lm -lc -lcrypt -lutil
    libc=/lib/libc-2.2.4.so, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
    cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'

Locally applied patches:
    DEVEL13745

---
@INC for perl v5.7.2:
    /usr/local/bleadperl/lib/5.7.2/ppc-linux-64int
    /usr/local/bleadperl/lib/5.7.2
    /usr/local/bleadperl/lib/site_perl/5.7.2/ppc-linux-64int
    /usr/local/bleadperl/lib/site_perl/5.7.2
    /usr/local/bleadperl/lib/site_perl
    .

---
Environment for perl v5.7.2:
    HOME=/home/schwern
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/home/schwern/bin:/home/schwern/sbin:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/usr/local/X11/bin:/usr/bin/X11:/usr/games
    PERL_BADLANG (unset)
    SHELL=/bin/bash


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About