Loading ...
Sorry, an error occurred while loading the content.

small patch for SOAP::Lite version 0.50

Expand Messages
  • dviner@yahoo-inc.com
    After using SOAP::Lite with Perl 5.6.1, I discovered a bug in the software. the problem seems to be with the regex engine and the lines: $_[0] =~ /^( w+):/ or
    Message 1 of 2 , Jun 27, 2001
    • 0 Attachment
      After using SOAP::Lite with Perl 5.6.1, I discovered a bug in the
      software. the problem seems to be with the regex engine and the
      lines:

      $_[0] =~ /^(\w+):/ or die "proxy: transport protocol not
      specified\n";
      my $protocol = uc $1; # untainted now

      the problem is that the $1 appears to be interpolated in the wrong
      context. the uc call ends up being AUTOLOAD'ed and calling
      proxy->ToUpper from the utf8_heavy library. I must confess ignorance
      as to why this occurs, but here's a super easy patch that will solves
      the problem for 5.6.1 and will work in 5.005 versions too:
      it's just wrapping the $1 in a join() to force string context.

      --- Lite.pm.old Wed Jun 27 13:28:08 2001
      +++ Lite.pm.new Wed Jun 27 15:50:14 2001
      @@ -120,7 +120,8 @@

      return $self->{_proxy} unless @_;
      $_[0] =~ /^(\w+):/ or die "proxy: transport protocol not
      specified\n";
      - my $protocol = uc $1; # untainted now
      + ## need to join $1 to force string context in 5.6.1
      + my $protocol = uc(join("",$1)); # untainted now
      # https: should be done through Transport::HTTP.pm
      for ($protocol) { s/^HTTPS$/HTTP/ }
    • Paul Kulchenko
      Hi, dviner! Weird. I ll try this one. Will $1 work instead of join( , $1)? In fact I m using 5.6.1 on windows and didn t see this problem. How can I test it
      Message 2 of 2 , Jun 27, 2001
      • 0 Attachment
        Hi, dviner!

        Weird. I'll try this one. Will "$1" work instead of join("", $1)? In
        fact I'm using 5.6.1 on windows and didn't see this problem. How can
        I test it (I would like to include test in my test suite, so it'll be
        checked on all platforms)?

        Thank you, and btw, what's you name? Who should I give a credit to?
        :)

        Best wishes, Paul.

        --- dviner@... wrote:
        > After using SOAP::Lite with Perl 5.6.1, I discovered a bug in the
        > software. the problem seems to be with the regex engine and the
        > lines:
        >
        > $_[0] =~ /^(\w+):/ or die "proxy: transport protocol not
        > specified\n";
        > my $protocol = uc $1; # untainted now
        >
        > the problem is that the $1 appears to be interpolated in the wrong
        > context. the uc call ends up being AUTOLOAD'ed and calling
        > proxy->ToUpper from the utf8_heavy library. I must confess
        > ignorance
        > as to why this occurs, but here's a super easy patch that will
        > solves
        > the problem for 5.6.1 and will work in 5.005 versions too:
        > it's just wrapping the $1 in a join() to force string context.
        >
        > --- Lite.pm.old Wed Jun 27 13:28:08 2001
        > +++ Lite.pm.new Wed Jun 27 15:50:14 2001
        > @@ -120,7 +120,8 @@
        >
        > return $self->{_proxy} unless @_;
        > $_[0] =~ /^(\w+):/ or die "proxy: transport protocol not
        > specified\n";
        > - my $protocol = uc $1; # untainted now
        > + ## need to join $1 to force string context in 5.6.1
        > + my $protocol = uc(join("",$1)); # untainted now
        > # https: should be done through Transport::HTTP.pm
        > for ($protocol) { s/^HTTPS$/HTTP/ }
        >
        >
        >
        >
        > To unsubscribe from this group, send an email to:
        > soaplite-unsubscribe@yahoogroups.com
        >
        >
        >
        > Your use of Yahoo! Groups is subject to
        > http://docs.yahoo.com/info/terms/
        >
        >


        __________________________________________________
        Do You Yahoo!?
        Get personalized email addresses from Yahoo! Mail
        http://personal.mail.yahoo.com/
      Your message has been successfully submitted and would be delivered to recipients shortly.