cvs: php4 /main rfc1867.c

From: Date: Sat, 17 Aug 2002 11:48:21 +0000
Subject: cvs: php4 /main rfc1867.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-13431@lists.php.net to get a copy of this message
sesser Sat Aug 17 07:48:21 2002 EDT Modified files: /php4/main rfc1867.c Log: IE does not use quotes but now we are safe... Index: php4/main/rfc1867.c diff -u php4/main/rfc1867.c:1.115 php4/main/rfc1867.c:1.116 --- php4/main/rfc1867.c:1.115 Sat Aug 17 07:31:06 2002 +++ php4/main/rfc1867.c Sat Aug 17 07:48:21 2002 @@ -16,7 +16,7 @@ | Jani Taskinen <sniper@php.net> | +----------------------------------------------------------------------+ */ -/* $Id: rfc1867.c,v 1.115 2002/08/17 11:31:06 sesser Exp $ */ +/* $Id: rfc1867.c,v 1.116 2002/08/17 11:48:21 sesser Exp $ */ /* * This product includes software developed by the Apache Group @@ -642,21 +642,20 @@ boundary++; boundary_len = strlen(boundary); - if (boundary[0] == '"' && boundary[boundary_len-1] == '"') { - if (boundary_len < 2) { /* otherwise a single " passes */ + if (boundary[0] == '"') { + boundary++; + boundary_end = strchr(boundary, '"'); + if (!boundary_end) { sapi_module.sapi_error(E_WARNING, "Invalid boundary in multipart/form-data POST data"); return; } - boundary++; - boundary_len -= 2; - boundary[boundary_len] = '\0'; } else { /* search for the end of the boundary */ boundary_end = strchr(boundary, ','); - if (boundary_end) { - boundary_end[0] = '\0'; - boundary_len = boundary_end-boundary; - } + } + if (boundary_end) { + boundary_end[0] = '\0'; + boundary_len = boundary_end-boundary; } /* Initialize the buffer */

« previous php.cvs (#13431) next »