From owner-freebsd-cvsweb@FreeBSD.ORG Wed Dec 8 08:35:37 2004 Return-Path: Delivered-To: freebsd-cvsweb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 92C3316A4CE for ; Wed, 8 Dec 2004 08:35:37 +0000 (GMT) Received: from shodan.ibl.sk (shodan.ibl.sk [62.168.111.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1EDC243D48 for ; Wed, 8 Dec 2004 08:35:37 +0000 (GMT) (envelope-from Jozef.Matula@iblsoft.com) Received: from shodan.ibl.sk (localhost [127.0.0.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by nod32.ibl.sk (Postfix) with ESMTP id 8FEC2282BF0; Wed, 8 Dec 2004 09:35:34 +0100 (CET) Received: by shodan.ibl.sk (Postfix, from userid 111) id 3701B282C3D; Wed, 8 Dec 2004 09:35:34 +0100 (CET) Received: from jimi.ibl.sk (jimi.ibl.sk [192.168.1.35]) by shodan.ibl.sk (Postfix) with ESMTP id 0AD28282BF0; Wed, 8 Dec 2004 09:35:32 +0100 (CET) From: Jozef Matula Organization: IBL Software Engineering To: FreeBSD-CVSweb , James Bromberger Date: Wed, 8 Dec 2004 09:35:30 +0100 User-Agent: KMail/1.7.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200412080935.30700.Jozef.Matula@iblsoft.com> X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on shodan X-Spam-Level: X-Spam-Status: No, score=-5.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.0.1 Subject: BUGREPORT: Tab to space expanding bug X-BeenThere: freebsd-cvsweb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS Web maintenance mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Dec 2004 08:35:37 -0000 Hello, We use CVSweb version 3:3.0.2-2 under Debian Linux unstable distribution. We found a bug in algorithm of expanding tabs into spaces in main CGI Perl script: - $1 was not in expansiong so, after multiple tab expansions text before tabs was discarded - expanding with less than $ts spaces was also incorrect, because $1 as (.*) was matching longest string, including any previous NOT EXPANDED tabs. I think, this patch is fixing it. --- cvsweb 2004-11-17 02:23:53.000000000 +0100 +++ /usr/lib/cgi-bin/cvsweb 2004-12-08 09:22:33.000000000 +0100 @@ -1579,7 +1579,7 @@ if (defined($ts)) { # Expand tabs - 1 while s/(.*)(\t+)/' ' x (length($2) * $ts - length($1) % $ts)/e; + 1 while s/(.*?)(\t+)/$1 . ' ' x (length($2) * $ts - length($1) % $ts)/e; } # replace and (\001 is to protect us from htmlify) Best regards, Jozef Matula -- Jozef MATULA (Jozef.Matula@iblsoft.com) IBL Software Engineering, http://www.iblsoft.com Mierova 103, 82105 Bratislava, Slovakia Tel: +421-2-43427227, fax: +421-2-43427214