From owner-freebsd-www@FreeBSD.ORG Mon Oct 6 09:00:17 2008 Return-Path: Delivered-To: freebsd-www@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 132BA10656AF; Mon, 6 Oct 2008 09:00:17 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id E5B378FC3A; Mon, 6 Oct 2008 09:00:16 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m9690GCa023243; Mon, 6 Oct 2008 09:00:16 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m9690GKl023242; Mon, 6 Oct 2008 09:00:16 GMT (envelope-from gnats) Resent-Date: Mon, 6 Oct 2008 09:00:16 GMT Resent-Message-Id: <200810060900.m9690GKl023242@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@freebsd.org (GNATS Filer) Resent-To: freebsd-www@FreeBSD.org Resent-Cc: wosch@freebsd.org, shaun@freebsd.org Resent-Reply-To: FreeBSD-gnats-submit@freebsd.org, Eygene Ryabinkin Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B143F106568F for ; Mon, 6 Oct 2008 09:00:01 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) Received: from 0.mx.codelabs.ru (0.mx.codelabs.ru [144.206.177.45]) by mx1.freebsd.org (Postfix) with ESMTP id 422838FC1B for ; Mon, 6 Oct 2008 09:00:00 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) Received: from void.codelabs.ru (void.codelabs.ru [144.206.177.25]) by 0.mx.codelabs.ru with esmtps (TLSv1:CAMELLIA256-SHA:256) id 1Kmlwd-00086E-QR for FreeBSD-gnats-submit@freebsd.org; Mon, 06 Oct 2008 12:59:59 +0400 Message-Id: <20081006085959.A1DB71AF41E@void.codelabs.ru> Date: Mon, 6 Oct 2008 12:59:59 +0400 (MSD) From: Eygene Ryabinkin To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 X-GNATS-Notify: wosch@freebsd.org, shaun@freebsd.org Cc: Subject: www/127898: [patch] query-pr.cgi: properly treat quoted-printable line continuations X-BeenThere: freebsd-www@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Eygene Ryabinkin List-Id: FreeBSD Project Webmasters List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Oct 2008 09:00:17 -0000 >Number: 127898 >Category: www >Synopsis: [patch] query-pr.cgi: properly treat quoted-printable line continuations >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-www >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Oct 06 09:00:16 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Eygene Ryabinkin >Release: FreeBSD 7.1-PRERELEASE i386 >Organization: Code Labs >Environment: Not applicable. >Description: Gnats Web interface (query-pr.cgi) fails to properly treat line continuations in the quoted-printable parts: is deletes the trailing '=', but does not joins the line with the next one. It has even comment in the code about this ;)) >How-To-Repeat: Look, for example, at http://www.freebsd.org/cgi/query-pr.cgi?pr=126853 >Fix: The following patch properly assembles continued lines before feeding them into the loop: --- 0001-Implement-proper-quoted-printable-line-continuation.patch begins here --- >From af39b0e8173c9fc76496f371a71666667719ade5 Mon Sep 17 00:00:00 2001 From: Eygene Ryabinkin Date: Mon, 6 Oct 2008 12:32:28 +0400 Web interface for FreeBSD Gnats database treats quoted-printable in an imcomplete way: it strips the trailing '=' signs, but does not join the lines. This can be demonstrated by looking at the PR 126853, for example, http://www.freebsd.org/cgi/query-pr.cgi?pr=126853 I had fixed this by detecting line continuations early and joining these lines before they will be processed any further. So, now the code is first assembling the whole continued line and only then is trying to interpret/format it. Signed-off-by: Eygene Ryabinkin --- query-pr.cgi | 18 ++++++++++++++++-- 1 files changed, 16 insertions(+), 2 deletions(-) mode change 100644 => 100755 query-pr.cgi diff --git a/query-pr.cgi b/query-pr.cgi old mode 100644 new mode 100755 index 9dd376d..e6f0165 --- a/query-pr.cgi +++ b/query-pr.cgi @@ -472,6 +472,7 @@ foreach my $field (@fields_multiple) my $url = "${self_url_base}${PR}"; my $outp = ""; + my $qpcont = ""; my %mime_headers; my $mime_boundary; my $mime_endheader; @@ -594,6 +595,21 @@ foreach my $field (@fields_multiple) if ($inresponse) { my $txt = $1; + # Detect Q-P line continuations, + # join them with the next line + # and process when the full line + # will be assembled. + if ($encoding == ENCODING_QP) { + if ($txt =~ /=$/) { + $txt =~ s/=$//; + $qpcont .= $txt; + next; + } else { + $txt = $qpcont . $txt; + $qpcont = ""; + } + } + if ($txt !~ /^-+$/ && $txt !~ /(?:cut|snip)/i && $txt =~ /^--(\S+)$/) { $mime_boundary = $1 if (!defined $mime_boundary && !$inpatch); @@ -658,8 +674,6 @@ foreach my $field (@fields_multiple) $outp .= $txt; next; } elsif ($encoding == ENCODING_QP) { - # XXX: lines ending in = should be joined - $txt =~ s/=$//; $txt = decode_qp($txt); } -- 1.6.0.2 --- 0001-Implement-proper-quoted-printable-line-continuation.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-www@FreeBSD.ORG Mon Oct 6 11:07:04 2008 Return-Path: Delivered-To: freebsd-www@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8D4C4106568A for ; Mon, 6 Oct 2008 11:07:04 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 7C7378FC13 for ; Mon, 6 Oct 2008 11:07:04 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m96B74P0035665 for ; Mon, 6 Oct 2008 11:07:04 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m96B73js035661 for freebsd-www@FreeBSD.org; Mon, 6 Oct 2008 11:07:03 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 6 Oct 2008 11:07:03 GMT Message-Id: <200810061107.m96B73js035661@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-www@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-www@FreeBSD.org X-BeenThere: freebsd-www@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD Project Webmasters List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Oct 2008 11:07:04 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o www/127898 www [patch] query-pr.cgi: properly treat quoted-printable o www/127774 www Link on the pre-release page does not link to the info o www/127698 www Modifications of a society support from France o www/127497 www new entry to FreeBSD/amd64 Project -- motherboards o www/127277 www Consulting Services o www/116660 www docs.freebsd.org returns bad chunked encoding o www/116479 www cvsweb+enscript formatting bugfix o www/111791 www FreeBSD website messes up links o www/111228 www [request] Usability improvements for bug search query o www/105333 www [PATCH] Base selection in events in libcommon.xsl does o www/103522 www Search interface oddity o www/98798 www Our statistics page is out of date o www/91539 www FreeBSD web site renders very badly s www/73551 www [request] fix list archive 'quoted-printable' corrupti o www/51135 www Problems with the mailing-lists search interface o www/44181 www www "Release Information" organization 16 problems total. From owner-freebsd-www@FreeBSD.ORG Sat Oct 11 10:24:27 2008 Return-Path: Delivered-To: freebsd-www@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5363A106568A; Sat, 11 Oct 2008 10:24:27 +0000 (UTC) (envelope-from jkois@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 2AD278FC2A; Sat, 11 Oct 2008 10:24:27 +0000 (UTC) (envelope-from jkois@FreeBSD.org) Received: from freefall.freebsd.org (jkois@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m9BAOR2x002652; Sat, 11 Oct 2008 10:24:27 GMT (envelope-from jkois@freefall.freebsd.org) Received: (from jkois@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m9BAORpl002648; Sat, 11 Oct 2008 10:24:27 GMT (envelope-from jkois) Date: Sat, 11 Oct 2008 10:24:27 GMT Message-Id: <200810111024.m9BAORpl002648@freefall.freebsd.org> To: jkois@FreeBSD.org, freebsd-www@FreeBSD.org, jkois@FreeBSD.org From: jkois@FreeBSD.org Cc: Subject: Re: www/127774: Link on the pre-release page does not link to the information it seems to want to X-BeenThere: freebsd-www@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD Project Webmasters List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Oct 2008 10:24:27 -0000 Synopsis: Link on the pre-release page does not link to the information it seems to want to Responsible-Changed-From-To: freebsd-www->jkois Responsible-Changed-By: jkois Responsible-Changed-When: Sat Oct 11 10:23:55 UTC 2008 Responsible-Changed-Why: Take. http://www.freebsd.org/cgi/query-pr.cgi?pr=127774 From owner-freebsd-www@FreeBSD.ORG Sat Oct 11 11:03:00 2008 Return-Path: Delivered-To: freebsd-www@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E10781065688; Sat, 11 Oct 2008 11:03:00 +0000 (UTC) (envelope-from jkois@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id B94668FC0A; Sat, 11 Oct 2008 11:03:00 +0000 (UTC) (envelope-from jkois@FreeBSD.org) Received: from freefall.freebsd.org (jkois@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m9BB30N9006636; Sat, 11 Oct 2008 11:03:00 GMT (envelope-from jkois@freefall.freebsd.org) Received: (from jkois@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m9BB30Kd006632; Sat, 11 Oct 2008 11:03:00 GMT (envelope-from jkois) Date: Sat, 11 Oct 2008 11:03:00 GMT Message-Id: <200810111103.m9BB30Kd006632@freefall.freebsd.org> To: jkois@FreeBSD.org, freebsd-www@FreeBSD.org, jkois@FreeBSD.org From: jkois@FreeBSD.org Cc: Subject: Re: www/127698: Modifications of a society support from France X-BeenThere: freebsd-www@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD Project Webmasters List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Oct 2008 11:03:01 -0000 Synopsis: Modifications of a society support from France Responsible-Changed-From-To: freebsd-www->jkois Responsible-Changed-By: jkois Responsible-Changed-When: Sat Oct 11 11:02:28 UTC 2008 Responsible-Changed-Why: Take. http://www.freebsd.org/cgi/query-pr.cgi?pr=127698