-
Notifications
You must be signed in to change notification settings - Fork 540
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 mode still breaks utf8 handling #8114
Comments
From christian@pflanze.mine.nuCreated by christian.jaeger@ethlife.ethz.chI'm in the process of "porting" a perl web app (fastcgi, running with I first had problems with 5.8.4: when I read in a block of data using use Encode; gave a $str which still had the utf8 byte sequences as characters (and (I'm actually using my own wrappers around open and read, so I didn't I did narrow those down to the usage of the -T flag. I found that one - switching off tainting mode "Fine, it has been fixed" I thought. But now I realized that something else still doesn't work under taint (What I'm doing is, I write a list of strings to one file, first my $d= [ list of strings or string refs ]; my @is_utf8; ) The problem is that sometimes Encode::is_utf8 reports false on a - the file being written to disk *does* contain utf8 sequences. As I said, again switching off taint mode seems to make it work fine. Thanks for your works, Perl Info
|
From dankogai@dan.co.jpChristian and Porters, Thanks for your report. On Sep 15, 2005, at 18:53 , Christian Jaeger (via RT) wrote:
I could not duplicate the symptom on perl 5.8.7 but on 5.8.6 I did. # you run the code as follows (on my Mac OS X v10.4.2);
As you see, on 5.8.6 utf8::is_utf8() works fine while Encode::is_utf8 /* universal.c */ /* ext/Encode/Encode.xs */ /* end of code */ Though not harmful, the behavior of 5.8.7 is not as documented as in Dan the Encode Maintainer |
The RT System itself - Status changed from 'new' to 'open' |
From christian@pflanze.mine.nuHello Thanks for your reply. At 5:29 Uhr -0700 15.09.2005, Dan Kogai via RT wrote:
With my perl 5.8.7 I'm getting: (thus the same as you with that version)
Interesting, I will try my app with -T again with utf8::is_utf8.
yes, but that's fine for me. Your test case can't explain the second mentioned problem I'm seeing One thing to note: I'm not opening files with ">:utf8" or "<:raw", but: That's the reason why I'm toggling off the utf8 flag of strings which Christian. |
From Mark.Martinec@ijs.siThis looks like the same bug as reported in: #32687: Encode::is_utf8 on tainted UTF8 string returns false ...still unresolved in 5.8.8. Mark |
p5p@spam.wizbit.be - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#37170 (status was 'resolved')
Searchable as RT37170$
The text was updated successfully, but these errors were encountered: