[interchange-cvs] interchange - jon modified lib/Vend/Server.pm

interchange-cvs at icdevgroup.org interchange-cvs at icdevgroup.org
Thu Feb 22 15:23:13 EST 2007


User:      jon
Date:      2007-02-22 20:23:12 GMT
Modified:  lib/Vend Tag: STABLE_5_4-branch Server.pm
Log:
Correct Interchange's handling of incoming requests where a form element
has a space in the name. Before the fix, when it gets to values space
it still has the plus. However true '+' characters will have also been
decoded, so you can't distinguish the two. This change switches pluses
to spaces before %2B gets switched to '+'.

Fixed by Brian Miller <brian at endpoint.com>.

(Merged from development branch.)

Revision  Changes    Path
No                   revision



No                   revision



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


rev 2.66.2.2, prev_rev 2.66.2.1
Index: Server.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Server.pm,v
retrieving revision 2.66.2.1
retrieving revision 2.66.2.2
diff -u -u -r2.66.2.1 -r2.66.2.2
--- Server.pm	6 Jun 2006 18:05:23 -0000	2.66.2.1
+++ Server.pm	22 Feb 2007 20:23:12 -0000	2.66.2.2
@@ -1,8 +1,8 @@
 # Vend::Server - Listen for Interchange CGI requests as a background server
 #
-# $Id: Server.pm,v 2.66.2.1 2006/06/06 18:05:23 kwalsh Exp $
+# $Id: Server.pm,v 2.66.2.2 2007/02/22 20:23:12 jon Exp $
 #
-# Copyright (C) 2002-2005 Interchange Development Group
+# Copyright (C) 2002-2007 Interchange Development Group
 # Copyright (C) 1996-2002 Red Hat, Inc.
 #
 # This program was originally based on Vend 0.2 and 0.3
@@ -26,7 +26,7 @@
 package Vend::Server;
 
 use vars qw($VERSION);
-$VERSION = substr(q$Revision: 2.66.2.1 $, 10);
+$VERSION = substr(q$Revision: 2.66.2.2 $, 10);
 
 use POSIX qw(setsid strftime);
 use Vend::Util;
@@ -349,6 +349,7 @@
 
 #::logDebug("incoming --> $key");
 		$key = $::IV->{$key} if defined $::IV->{$key};
+		$key =~ tr/+/ /;
 		$key =~ s/%([0-9a-fA-F][0-9a-fA-F])/chr(hex $1)/ge;
 #::logDebug("mapping  --> $key");
 		$value =~ tr/+/ /;








More information about the interchange-cvs mailing list