diff options
author | Nick Ing-Simmons <nik@tiuk.ti.com> | 1997-11-07 23:52:35 +0000 |
---|---|---|
committer | Nick Ing-Simmons <nik@tiuk.ti.com> | 1997-11-07 23:52:35 +0000 |
commit | aeea060ce4b653ecf5b0731f1cbfcf468f688acd (patch) | |
tree | 071ed1fbe63cb80bbddce550bd8c0b9942527b3f /taint.c | |
parent | e77eedc24c0252a902559034f2aa207f216529cc (diff) | |
download | perl-aeea060ce4b653ecf5b0731f1cbfcf468f688acd.tar.gz |
Reverse integrate Malcolm's chanes into local
repository, then import result back into my view
of Malcolm's repository.
Builds and passes (most) tests with GNU C++/Solaris
and Borland C++, Win32.
p4raw-id: //depot/ansiperl@210
Diffstat (limited to 'taint.c')
-rw-r--r-- | taint.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -10,6 +10,7 @@ void taint_proper(const char *f, char *s) { + dTHR; /* just for taint */ char *ug; DEBUG_u(PerlIO_printf(Perl_debug_log, @@ -68,10 +69,12 @@ taint_env(void) svp = hv_fetch(GvHVn(envgv),"PATH",4,FALSE); if (svp && *svp) { if (SvTAINTED(*svp)) { + dTHR; TAINT; taint_proper("Insecure %s%s", "$ENV{PATH}"); } if ((mg = mg_find(*svp, 'e')) && MgTAINTEDDIR(mg)) { + dTHR; TAINT; taint_proper("Insecure directory in %s%s", "$ENV{PATH}"); } @@ -81,6 +84,7 @@ taint_env(void) /* tainted $TERM is okay if it contains no metachars */ svp = hv_fetch(GvHVn(envgv),"TERM",4,FALSE); if (svp && *svp && SvTAINTED(*svp)) { + dTHR; /* just for taint */ bool was_tainted = tainted; char *t = SvPV(*svp, na); char *e = t + na; @@ -99,6 +103,7 @@ taint_env(void) for (e = misc_env; *e; e++) { svp = hv_fetch(GvHVn(envgv), *e, strlen(*e), FALSE); if (svp && *svp != &sv_undef && SvTAINTED(*svp)) { + dTHR; /* just for taint */ TAINT; taint_proper("Insecure $ENV{%s}%s", *e); } |