Subject: | multipart_init.t logic flaw |
Hi,
investigating at the multipart boundary issue (CVE-2010-2761), I noticed
that test 5 in multipart_init.t that's supposed to test for a random
boundary, succeeds even without the fix. This is because $sv is created
with an explicit fixed boundary, so the randomness doesn't make any
difference.
I'm attaching a proposed fix. This is still present in the github
repository.
Thanks for your work,
--
Niko Tyni
ntyni@debian.org
Subject: | 0001-Improve-the-random-multipart-boundary-test.patch |
From cadb707191b3a3efb39a94f36e03e9734c7277dc Mon Sep 17 00:00:00 2001
From: Niko Tyni <ntyni@debian.org>
Date: Mon, 27 Dec 2010 15:40:35 +0200
Subject: [PATCH] Improve the random multipart boundary test
The test now actually fails without the random boundary fix
(CVE-2010-2761).
---
t/multipart_init.t | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/t/multipart_init.t b/t/multipart_init.t
index 4da809a..f0a05e0 100644
--- a/t/multipart_init.t
+++ b/t/multipart_init.t
@@ -15,5 +15,6 @@ $sv = $q->multipart_init( -boundary => 'this_is_another_boundary' );
like($sv,
qr/boundary="this_is_another_boundary"/, "multipart_init( -boundary => 'this_is_another_boundary')");
+$sv = $q->multipart_init;
my $sv2 = $q->multipart_init;
isnt($sv,$sv2,"due to random boundaries, multiple calls produce different results");
--
1.7.2.3