https://github.com/AndyA/CGI--Simple/commit/e4942b871a26c1317a175a91ebb7262eea59b380 diff -Naurp CGI-Simple-1.1/lib/CGI/Simple.pm CGI-Simple-1.1.oden/lib/CGI/Simple.pm --- CGI-Simple-1.1/lib/CGI/Simple.pm 2007-07-13 14:13:25.000000000 -0400 +++ CGI-Simple-1.1.oden/lib/CGI/Simple.pm 2010-12-09 06:56:13.000000000 -0500 @@ -1070,7 +1070,13 @@ sub multipart_init { my ( $self, @p ) = @_; use CGI::Simple::Util qw(rearrange); my ( $boundary, @other ) = rearrange( ['BOUNDARY'], @p ); - $boundary = $boundary || '------- =_aaaaaaaaaa0'; + if ( !$boundary ) { + $boundary = '------- =_'; + my @chrs = ( '0' .. '9', 'A' .. 'Z', 'a' .. 'z' ); + for ( 1 .. 17 ) { + $boundary .= $chrs[ rand( scalar @chrs ) ]; + } + } my $CRLF = $self->crlf; # get CRLF sequence my $warning = "WARNING: YOUR BROWSER DOESN'T SUPPORT THIS SERVER-PUSH TECHNOLOGY."; diff -Naurp CGI-Simple-1.1/t/050.simple.t CGI-Simple-1.1.oden/t/050.simple.t --- CGI-Simple-1.1/t/050.simple.t 2007-07-13 14:08:41.000000000 -0400 +++ CGI-Simple-1.1.oden/t/050.simple.t 2010-12-09 06:57:05.000000000 -0500 @@ -973,10 +973,10 @@ $q = new CGI::Simple; $sv = $q->multipart_init(); like( $sv, - qr|Content-Type: multipart/x-mixed-replace;boundary="------- =_aaaaaaaaaa0"|, + qr|Content-Type: multipart/x-mixed-replace;boundary="------- =_[a-zA-Z0-9]{17}"|, 'multipart_init(), 1' ); -like($sv, qr/--------- =_aaaaaaaaaa0$CRLF/, 'multipart_init(), 2'); +like($sv, qr/--------- =_[a-zA-Z0-9]{17}$CRLF/, 'multipart_init(), 2'); $sv = $q->multipart_init('this_is_the_boundary'); like($sv, qr/boundary="this_is_the_boundary"/, 'multipart_init(), 3'); $sv = $q->multipart_init(-boundary => 'this_is_another_boundary'); diff -Naurp CGI-Simple-1.1/t/070.standard.t CGI-Simple-1.1.oden/t/070.standard.t --- CGI-Simple-1.1/t/070.standard.t 2007-07-13 14:08:43.000000000 -0400 +++ CGI-Simple-1.1.oden/t/070.standard.t 2010-12-09 06:57:23.000000000 -0500 @@ -984,10 +984,10 @@ restore_parameters(); $sv = multipart_init(); like( $sv, - qr|Content-Type: multipart/x-mixed-replace;boundary="------- =_aaaaaaaaaa0"|, + qr|Content-Type: multipart/x-mixed-replace;boundary="------- =_[a-zA-Z0-9]{17}"|, 'multipart_init(), 1' ); -like($sv, qr/--------- =_aaaaaaaaaa0$CRLF/, 'multipart_init(), 2'); +like($sv, qr/--------- =_[a-zA-Z0-9]{17}$CRLF/, 'multipart_init(), 2'); $sv = multipart_init('this_is_the_boundary'); like($sv, qr/boundary="this_is_the_boundary"/, 'multipart_init(), 3'); $sv = multipart_init(-boundary => 'this_is_another_boundary');