List Info

Thread: Re: $1 suddenly tainted after regexp on utf-8 string




Re: $1 suddenly tainted after regexp on utf-8 string
user name
2007-11-06 10:02:06
Nicholas Clark <nickccl4.org> wrote:
:On Tue, Nov 06, 2007 at 07:38:36AM -0800, dst  heise.
de wrote:
:
:> After applying a regex using S on a string which is
flagged as utf-8
:> the submatch is unexpectedly tainted.  You can
reproduce the behaviour
:> with this code:
[...]
:> $first is unexpectedly tainted.  If you comment out
the line which
:> flags $line as utf-8, $first is not tainted any
longer.
:
:It's in still in blead. I thought that it was something to
do with the swash
:loading code:
[...]
:But it doesn't seem to be, because if I change the program
to be a loop:
[...]
:the results change. (Correct output would be
"untainted" both times)

Is it because of the way multiple magic is handled, by
hiding the first
magic in the chain when handing on to the next? I seem to
remember that
causing a problem similar to this in the past.

Hugo

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )