Skip to content
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

maintain taint flag when encoding MIME on old perl #29

Merged
merged 2 commits into from
Jan 22, 2015

Conversation

haarg
Copy link
Contributor

@haarg haarg commented Jan 22, 2015

On perl 5.8.8 and below, loading utf8_heavy.pl (which happens implictly
in many places) will cause a split using a character class to not
maintain the taint flag. Since the MIME header encoding reconstructs
the string after splitting it, we need to explicitly copy the taint flag
using a substr($s, 0, 0).

Also includes a small test adjustment I used to track this down.

On perl 5.8.8 and below, loading utf8_heavy.pl (which happens implictly
in many places) will cause a split using a character class to not
maintain the taint flag.  Since the MIME header encoding reconstructs
the string after splitting it, we need to explicitly copy the taint flag
using a substr($s, 0, 0).
dankogai added a commit that referenced this pull request Jan 22, 2015
maintain taint flag when encoding MIME on old perl
@dankogai dankogai merged commit 4d9fd3a into dankogai:master Jan 22, 2015
rehsack added a commit to meta-cpan/meta-cpan that referenced this pull request Jan 23, 2015
from 2.67 to 2.68. Changes since 2.67:
$Revision: 2.68 $ $Date: 2015/01/22 10:17:32 $
! Pulled: Fix C++ build on Windows with VC++
  dankogai/p5-encode#30
  https://rt.cpan.org/Public/Bug/Display.html?id=82897
! lib/Encode/MIME/Header.pm t/taint.t
  Pulled: maintain taint flag when encoding MIME on old perl
  dankogai/p5-encode#29
! Encode.pm
  POD fixes
  dankogai/p5-encode#27
! bin/enc2xs
  Addressed: RT#101345: [PATCH] reduce compiler warnings and stderr noise
  enc2xs no longer emits verbose messages to STDERR
  unless -v switch or $ENV{ENC2XS_VERBOSE} is set.
  https://rt.cpan.org/Public/Bug/Display.html?id=101345
jsonn pushed a commit to jsonn/pkgsrc that referenced this pull request Apr 26, 2015
-------------------
Revision: 2.73 Date: 2015/04/15 23:14:01
! MANIFEST
+ t/isa.t
! Encode.pm
  Addressed RT#103253: Encode::XS does not inherit from Encode::Encoding
  https://rt.cpan.org/Public/Bug/Display.html?id=103253
! encoding.pm
+ t/encoding-locale.t
  Pulled: Rewrite of encoding::_get_locale_encoding for more portability #40
! encoding.pm
  Pulled: encoding.pm: more inlining #39
  dankogai/p5-encode#39

2.72 2015/03/14 02:44:39
! encoding.pm
  Copied from bleadperl to be in sync with it again.
  http://www.nntp.perl.org/group/perl.perl5.porters/2015/03/msg226576.html

2.71 2015/03/12 00:03:52
! encoding.pm
  Pulled: Don't fail 'no encoding' on EBCDIC
  dankogai/p5-encode#38
! lib/Encode/Alias.pm t/Aliases.t
  Add cp65000 => UTF-7 and cp65001 => utf-8-strict
  dankogai/p5-encode#37
! encoding.pm
  Sync w/ bleadperl
  dankogai/p5-encode#36
! bin/encguess
  Pulled: show encguess example per #33
  dankogai/p5-encode#34

2.70 2015/02/05 10:53:00
! Makefile.PL
  add bin/encguess to EXE_FILES

2.69 2015/02/05 10:35:11
! bin/encguess
  Refactored so that
  * does not depend on non-core module (File::Slurp in particular)
  * PODified document
  * -s "encA encB" to -s encA,encB which is more shell-friendly
  * and more
! MANIFEST
+ bin/encguess
  Pulled: Added CLI wrapper for Encode::Guess
  dankogai/p5-encode#32
! Unicode/Unicode.pm
  Pulled: Bump $VERSION in module changed since Encode-2.60
  dankogai/p5-encode#31

2.68 2015/01/22 10:17:32
! Pulled: Fix C++ build on Windows with VC++
  dankogai/p5-encode#30
  https://rt.cpan.org/Public/Bug/Display.html?id=82897
! lib/Encode/MIME/Header.pm t/taint.t
  Pulled: maintain taint flag when encoding MIME on old perl
  dankogai/p5-encode#29
! Encode.pm
  POD fixes
  dankogai/p5-encode#27
! bin/enc2xs
  Addressed: RT#101345: [PATCH] reduce compiler warnings and stderr noise
  enc2xs no longer emits verbose messages to STDERR
  unless -v switch or $ENV{ENC2XS_VERBOSE} is set.
  https://rt.cpan.org/Public/Bug/Display.html?id=101345

2.67 2014/12/04 20:13:00
! t/taint.t
  Now skips nonexistent methods like Encode::Detect->encode() should
  that be installed.  This resolves RT#100105.
  https://rt.cpan.org/Ticket/Display.html?id=100105

2.66 2014/12/02 23:30:34 $
! bin/enc2xs
  Resolved RT#100656: enc2xs -C fails if URL::Encode::XS is installed
  https://rt.cpan.org/Ticket/Display.html?id=100656

2.65 2014/11/27 14:08:33
! Changes Encode.xs bin/enc2xs
  Applied 3 patches from jhi:
    0001-For-C-don-t-use-the-array-size-in-forward-declaratiotion
    0002-Unused-variables
    0003-1-needs-casting-to-STRLEN
  Message-Id: <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants