From owner-freebsd-current@FreeBSD.ORG Fri Dec 30 17:52:29 2005 Return-Path: X-Original-To: freebsd-current@FreeBSD.ORG Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D45ED16A41F for ; Fri, 30 Dec 2005 17:52:29 +0000 (GMT) (envelope-from cracauer@schlepper.zs64.net) Received: from schlepper.zs64.net (schlepper.zs64.net [212.12.50.230]) by mx1.FreeBSD.org (Postfix) with ESMTP id 314E043D62 for ; Fri, 30 Dec 2005 17:52:29 +0000 (GMT) (envelope-from cracauer@schlepper.zs64.net) Received: from schlepper.zs64.net (schlepper [212.12.50.230]) by schlepper.zs64.net (8.13.3/8.12.9) with ESMTP id jBUHqRri034905 for ; Fri, 30 Dec 2005 18:52:27 +0100 (CET) (envelope-from cracauer@schlepper.zs64.net) Received: (from cracauer@localhost) by schlepper.zs64.net (8.13.3/8.12.9/Submit) id jBUHqRZc034904 for freebsd-current@FreeBSD.ORG; Fri, 30 Dec 2005 12:52:27 -0500 (EST) (envelope-from cracauer) Date: Fri, 30 Dec 2005 12:52:27 -0500 From: Martin Cracauer To: freebsd-current@FreeBSD.ORG Message-ID: <20051230125227.A33408@cons.org> References: <20051229221459.A17102@cons.org> <030d01c60cf1$db80a290$1200a8c0@gsicomp.on.ca> <20051230035724.GA52167@nagual.pp.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20051230035724.GA52167@nagual.pp.ru>; from ache@FreeBSD.ORG on Fri, Dec 30, 2005 at 06:57:24AM +0300 Cc: Subject: Re: fetch extension - use local filename from content-dispositionheader (new diff) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Dec 2005 17:52:30 -0000 Allright. Polishing: - disallow "/" anywhere in the filename - disallow "." at the beginning - replace all chars less than ' ' or > 127 with "_" - use a static buffer of size [MAX_PATH] instead of allocated memory, to be fail-safe against memory leaks from other applications using libfetch - typo corrected, style fixes, manual entries I also added a "-Q" flag which will print the resulting filename to stdout. This is useful in scripting. Diff on http:/www.cons.org/tmp/freebsd-fetch-O2.diff When discussing, keep in mind that the user has to explicity give the -O option (there is no environment variable to permanently turn this on) and that the implications of the -O options are very clear and simple. And that the main use of this is for folks who have to go through a gazillion of Bugzilla attachments all name "customer-errlog.20051220" etc, and there is no other way to download them in a name-preserving manner than interactively opening them in Mozilla and saving them. Before we randomize the list even more I would say I'd like to hear from the security officer if there is concern left. Myself I have no way to form conflicting user opinions into a decision. For the reasons above I plan to go forward if not vetoed. Martin -- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Martin Cracauer http://www.cons.org/cracauer/ FreeBSD - where you want to go, today. http://www.freebsd.org/