Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Jun 2009 13:04:37 +0400 (MSD)
From:      Artemiev Igor <ai@kliksys.ru>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        osa@FreeBSD.org
Subject:   ports/136064: nginx uploadprogress module incorrect X-Progress-ID argument parsing (patch)
Message-ID:  <200906260904.n5Q94bLX072106@aef.kliksoft.ru>
Resent-Message-ID: <200906260920.n5Q9K1HG007819@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         136064
>Category:       ports
>Synopsis:       nginx uploadprogress module incorrect X-Progress-ID argument parsing (patch)
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jun 26 09:20:01 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Artemiev Igor
>Release:        FreeBSD 7.2-STABLE i386
>Organization:
KlikSys
>Environment:
System: FreeBSD one.kliksys.ru 7.2-STABLE FreeBSD 7.2-STABLE #7: Sun May 17 14:54:10 MSD 2009 root@one.kliksys.ru:/usr/obj/usr/src.7/sys/KERNEL i386

>Description:
nginx 0.7.59. 
Requests like "GET /progress?X-Progress-ID=09e409d35e1b9dd1b5a2982709ac79eb&JsHttpRequest=12460060723877-script HTTP/1.1" cannot process properly, because module parse tracking_id as '09e409d35e1b9dd1b5a2982709ac79eb&JsHttpRequest=12460060723877-script' and instantly return "new Object({ 'state' : 'starting' })" 

>How-To-Repeat:
    Any trivial config from uploadprogress examples and request progress with X-Progress-ID and some args together

>Fix:
    Patch below fix this problem:

--- ngx_http_uploadprogress_module.c.orig	2009-06-26 08:34:21.000000000 +0000
+++ ngx_http_uploadprogress_module.c	2009-06-26 08:43:57.000000000 +0000
@@ -187,8 +187,9 @@
         if (i) {
             start_p = p += 14;
             while (p < r->args.data + r->args.len) {
-                if (*p++ != '&') {
-                    continue;
+                if (*p++ == '&') {
+		    p--;
+                    break;
                 }
             }
 
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906260904.n5Q94bLX072106>