[perl-SOAP-Lite] Fix sending a large object

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



commit 9369e07e2a8a19e2873205461a203de004f209c6
Author: Petr Písař <ppisar@xxxxxxxxxx>
Date:   Mon May 6 14:38:32 2013 +0200

    Fix sending a large object

 ...715-Accept-more-digit-number-in-_traverse.patch |   71 ++++++++++++++++++++
 perl-SOAP-Lite.spec                                |   14 +++-
 2 files changed, 81 insertions(+), 4 deletions(-)
---
diff --git a/SOAP-Lite-0.715-Accept-more-digit-number-in-_traverse.patch b/SOAP-Lite-0.715-Accept-more-digit-number-in-_traverse.patch
new file mode 100644
index 0000000..9d453b4
--- /dev/null
+++ b/SOAP-Lite-0.715-Accept-more-digit-number-in-_traverse.patch
@@ -0,0 +1,71 @@
+From fc370b31446533cc74a03f2af3949370a07e9980 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@xxxxxxxxxx>
+Date: Mon, 6 May 2013 14:22:16 +0200
+Subject: [PATCH] Accept more-digit number in _traverse()
+
+When sending a large object (many levels deep) through SOAP::Lite,
+you got an error: Incorrect parameter at
+/usr/lib/perl5/site_perl/5.8.8/SOAP/Lite.pm line 1993.
+
+This fixes wrong check for a number.
+
+Thanks to aharper[...]ecstuning.com and TONVOON[...]cpan.org.
+
+<https://rt.cpan.org/Public/Bug/Display.html?id=78692>
+---
+ lib/SOAP/Lite.pm |  2 +-
+ t/02-payload.t   | 11 ++++++++++-
+ 2 files changed, 11 insertions(+), 2 deletions(-)
+
+diff --git a/lib/SOAP/Lite.pm b/lib/SOAP/Lite.pm
+index 691e675..a37b27a 100644
+--- a/lib/SOAP/Lite.pm
++++ b/lib/SOAP/Lite.pm
+@@ -1990,7 +1990,7 @@ sub match {
+ sub _traverse {
+     my ($self, $pointer, $itself, $path, @path) = @_;
+ 
+-    die "Incorrect parameter" unless $itself =~/^\d$/;
++    die "Incorrect parameter" unless $itself =~/^\d+$/;
+ 
+     if ($path && substr($path, 0, 1) eq '{') {
+         $path = join '/', $path, shift @path while @path && $path !~ /}/;
+diff --git a/t/02-payload.t b/t/02-payload.t
+index 6501ac1..1ab5171 100644
+--- a/t/02-payload.t
++++ b/t/02-payload.t
+@@ -10,7 +10,7 @@ BEGIN {
+ use strict;
+ use Test;
+ 
+-BEGIN { plan tests => 131 }
++BEGIN { plan tests => 133 }
+ 
+ use SOAP::Lite;
+ $SIG{__WARN__} = sub { ; }; # turn off deprecation warnings
+@@ -97,6 +97,12 @@ my($a, $s, $r, $serialized, $deserialized);
+ <item2 xsi:type="xsd:int">60</item2>
+ <item2 xsi:type="xsd:int">100</item2>
+ <item3 xsi:type="xsd:int">200</item3>
++<item3 xsi:type="xsd:int">200</item3>
++<item4 xsi:type="xsd:int">200</item4>
++<item4 xsi:type="xsd:int">200</item4>
++<item5 xsi:type="xsd:int">400</item5>
++<item5 xsi:type="xsd:int">450</item5>
++<item6 xsi:type="xsd:int">600</item6>
+ </nums>
+ </m:doublerResponse>
+ </soap:Body>
+@@ -108,6 +114,9 @@ my($a, $s, $r, $serialized, $deserialized);
+   ok($deserialized->valueof("$result/[1]") == 20);
+   ok($deserialized->valueof("$result/[3]") == 60);
+   ok($deserialized->valueof("$result/[5]") == 200);
++  ok($deserialized->valueof("$result/[9]") == 400);
++  # Test more than 9 items to check depth is okay - RT78692
++  ok($deserialized->valueof("$result/[11]") == 600);
+ 
+   # match should return true/false in boolean context (and object ref otherwise)
+   ok($deserialized->match('aaa') ? 0 : 1);
+-- 
+1.8.1.4
+
diff --git a/perl-SOAP-Lite.spec b/perl-SOAP-Lite.spec
index cef51f8..7b2cea1 100644
--- a/perl-SOAP-Lite.spec
+++ b/perl-SOAP-Lite.spec
@@ -1,15 +1,18 @@
 Name:       perl-SOAP-Lite
 Version:    0.715
-Release:    3%{?dist}
+Release:    4%{?dist}
 Summary:    Client and server side SOAP implementation
 License:    GPL+ or Artistic
 Group:      Development/Libraries
 URL:        http://search.cpan.org/dist/SOAP-Lite/
 Source0:    http://search.cpan.org/CPAN/authors/id/M/MK/MKUTTER/SOAP-Lite-%{version}.tar.gz
 Patch0:     perl-SOAP-Lite-0.715-IO-modules.patch
+# bug #960011, CPAN RT#78692
+Patch1:     SOAP-Lite-0.715-Accept-more-digit-number-in-_traverse.patch
 BuildArch:  noarch
 
 # Core package
+BuildRequires:  perl
 BuildRequires:  perl(Class::Inspector)
 BuildRequires:  perl(constant)
 BuildRequires:  perl(MIME::Base64)
@@ -66,7 +69,8 @@ client and server side.
 
 %prep
 %setup -q -n SOAP-Lite-%{version}
-%patch0 -p1 -b .IO
+%patch0 -p1
+%patch1 -p1
 find examples -type f -exec chmod ugo-x {} \;
 
 %build
@@ -74,9 +78,8 @@ perl Makefile.PL --noprompt INSTALLDIRS=vendor
 make %{?_smp_mflags}
 
 %install
-make pure_install PERL_INSTALL_ROOT=%{buildroot}
+make pure_install DESTDIR=%{buildroot}
 find %{buildroot} -type f -name .packlist -exec rm -f {} ';'
-find %{buildroot} -type d -depth -exec rmdir {} 2>/dev/null ';'
 chmod -R u+w %{buildroot}/*
 
 %check
@@ -95,6 +98,9 @@ make test
 %{_mandir}/man1/*
 
 %changelog
+* Mon May 06 2013 Petr Pisar <ppisar@xxxxxxxxxx> - 0.715-4
+- Fix sending a large object (bug #960011)
+
 * Thu Feb 14 2013 Fedora Release Engineering <rel-eng@xxxxxxxxxxxxxxxxxxxxxxx> - 0.715-3
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
 
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/perl-devel





[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Legacy Announce]     [Fedora PHP Devel]     [Kernel Devel]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Big List of Linux Books]     [Gimp]     [Yosemite Information]
  Powered by Linux