From 9486279ceb5a3e105081b7470810dca288230535 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Tue, 18 Feb 2014 11:45:48 -0700 Subject: [PATCH] lib/locale.t: Untaint before checking if next thing taints The tests weren't testing what they purported to, as we should be sure to start with untained values to see if the operation taints. --- lib/locale.t | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/locale.t b/lib/locale.t index b195394..1dce940 100644 --- a/lib/locale.t +++ b/lib/locale.t @@ -159,6 +159,14 @@ check_taint $+; check_taint $1; check_taint_not $2; +/(.)/; # untaint $&, $`, $', $+, $1. +check_taint_not $&, '/(.)/'; +check_taint_not $`; +check_taint_not $'; +check_taint_not $+; +check_taint_not $1; +check_taint_not $2; + /(\s)/; # taint $&, $`, $', $+, $1. check_taint $&; check_taint $`; @@ -167,6 +175,9 @@ check_taint $+; check_taint $1; check_taint_not $2; +/(.)/; # untaint $&, $`, $', $+, $1. +check_taint_not $&, '/(.)/'; + /(\S)/; # taint $&, $`, $', $+, $1. check_taint $&; check_taint $`; -- 2.7.4