[pubcookie-dev] CVS update: fox;
webiso/pubcookie/cgic cgic.c,1.3,1.4 testform.html,1.1,1.2
fox at washington.edu
fox at washington.edu
Fri Jan 15 14:33:13 PST 2010
Update of /usr/local/cvsroot/webiso/pubcookie/cgic
In directory webiso-cvs.cac.washington.edu:/var/tmp/cvs-serv6855/webiso/pubcookie/cgic
Modified Files:
cgic.c testform.html
Log Message:
Fix cgic bug (fails on non "name=value" args)
Index: webiso/pubcookie/cgic/cgic.c
diff -u webiso/pubcookie/cgic/cgic.c:1.3 webiso/pubcookie/cgic/cgic.c:1.4
--- webiso/pubcookie/cgic/cgic.c:1.3 Tue Dec 14 18:12:47 2004
+++ webiso/pubcookie/cgic/cgic.c Fri Jan 15 14:33:11 2010
@@ -1,5 +1,5 @@
/*
- $Id: cgic.c,v 1.3 2004/12/15 02:12:47 jteaton Exp $
+ $Id: cgic.c,v 1.4 2010/01/15 22:33:11 fox Exp $
*/
#ifdef WITH_FCGI
@@ -248,11 +248,17 @@
while (pos != length) {
int foundEq = 0;
int foundAmp = 0;
+ int skipArg = 0;
int start = pos;
int len = 0;
char *attr;
char *value;
while (pos != length) {
+ if (data[pos] == '&') { /* arg not 'a=b' */
+ skipArg = 1;
+ pos++;
+ break;
+ }
if (data[pos] == '=') {
foundEq = 1;
pos++;
@@ -261,6 +267,7 @@
pos++;
len++;
}
+ if (skipArg) continue;
if (!foundEq) {
break;
}
Index: webiso/pubcookie/cgic/testform.html
diff -u webiso/pubcookie/cgic/testform.html:1.1 webiso/pubcookie/cgic/testform.html:1.2
--- webiso/pubcookie/cgic/testform.html:1.1 Thu Aug 15 16:47:16 2002
+++ webiso/pubcookie/cgic/testform.html Fri Jan 15 14:33:11 2010
@@ -4,7 +4,7 @@
</head>
<body>
<h1>CGI-C Test Form</h1>
-<form method="POST" action="http://CHANGE_THIS_URL!">
+<form method="POST" action="cgictest.cgi">
<p>
Text Field containing Plaintext
<p>
end of message
More information about the pubcookie-dev
mailing list