[interchange-cvs] interchange - kwalsh modified 2 files

interchange-core@interchange.redhat.com interchange-core@interchange.redhat.com
Tue May 14 11:26:01 2002


User:      kwalsh
Date:      2002-05-14 15:25:27 GMT
Modified:  lib/Vend Tag: STABLE_4_8-branch Server.pm
Modified:  .        Tag: STABLE_4_8-branch WHATSNEW
Log:
	* This patch clears the following intermittent error:

		CGI mapping error: multipart/form-data sent incorrectly

	  Some browsers, like Opera, use non-word characters like '+' in
	  form-data MIME boundaries, causing the regex matches to fail.

Revision  Changes    Path
No                   revision



No                   revision



2.0.2.3   +4 -3      interchange/lib/Vend/Server.pm


rev 2.0.2.3, prev_rev 2.0.2.2
Index: Server.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Server.pm,v
retrieving revision 2.0.2.2
retrieving revision 2.0.2.3
diff -u -r2.0.2.2 -r2.0.2.3
--- Server.pm	7 May 2002 16:45:35 -0000	2.0.2.2
+++ Server.pm	14 May 2002 15:25:26 -0000	2.0.2.3
@@ -1,6 +1,6 @@
 # Vend::Server - Listen for Interchange CGI requests as a background server
 #
-# $Id: Server.pm,v 2.0.2.2 2002/05/07 16:45:35 jon Exp $
+# $Id: Server.pm,v 2.0.2.3 2002/05/14 15:25:26 kwalsh Exp $
 #
 # Copyright (C) 1996-2002 Red Hat, Inc. <interchange@redhat.com>
 #
@@ -25,7 +25,7 @@
 package Vend::Server;
 
 use vars qw($VERSION);
-$VERSION = substr(q$Revision: 2.0.2.2 $, 10);
+$VERSION = substr(q$Revision: 2.0.2.3 $, 10);
 
 use POSIX qw(setsid strftime);
 use Vend::Util;
@@ -226,7 +226,7 @@
 		# even though it's sent as non-multipart data
 		# Contributed by Bill Randle
 		my ($boundary) = $CGI::content_type =~ /boundary=\"?([^\";]+)\"?/;
-		$boundary = "--$boundary";
+		$boundary = '--' . quotemeta $boundary;
 		return parse_multipart($sref) if $$sref =~ /^\s*$boundary\s+/;
 	}
 	@pairs = split($Global::UrlSplittor, $$sref);
@@ -296,6 +296,7 @@
 sub parse_multipart {
 	my $sref = shift;
 	my ($boundary) = $CGI::content_type =~ /boundary=\"?([^\";]+)\"?/;
+	$boundary = quotemeta $boundary;
 #::logDebug("got to multipart");
 	# Stolen from CGI.pm, thanks Lincoln
 	$boundary = "--$boundary"



No                   revision



No                   revision



2.6.2.53  +4 -0      interchange/WHATSNEW


rev 2.6.2.53, prev_rev 2.6.2.52
Index: WHATSNEW
===================================================================
RCS file: /var/cvs/interchange/WHATSNEW,v
retrieving revision 2.6.2.52
retrieving revision 2.6.2.53
diff -u -r2.6.2.52 -r2.6.2.53
--- WHATSNEW	11 May 2002 12:53:13 -0000	2.6.2.52
+++ WHATSNEW	14 May 2002 15:25:26 -0000	2.6.2.53
@@ -19,6 +19,10 @@
 
 * Fixed missing usertags in catalog subs called from Autoload.
 
+* Fixed a bug in Server.pm that caused Opera users, and possibly users
+  of other browsers, to get intermittent "CGI mapping error" failures
+  when POSTing forms.
+
 Packaging
 ---------