From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Re: master 739593d 3/5: Make gnus-copy-file act like copy-file etc. Date: Tue, 12 Sep 2017 12:22:24 -0700 Organization: UCLA Computer Science Department Message-ID: <83fa9922-8d83-9d2f-82af-f34e90521d88@cs.ucla.edu> References: <20170911053128.28763.28434@vcs0.savannah.gnu.org> <20170911053130.C5F002068F@vcs0.savannah.gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------EC3699115127BD838BD1882C" X-Trace: blaine.gmane.org 1505338742 22058 195.159.176.226 (13 Sep 2017 21:39:02 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 13 Sep 2017 21:39:02 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 Cc: emacs-devel@gnu.org To: Katsumi Yamaoka , Ken Brown Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Sep 12 21:22:57 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1drqlS-0006Cz-Mo for ged-emacs-devel@m.gmane.org; Tue, 12 Sep 2017 21:22:30 +0200 Original-Received: from localhost ([::1]:38254 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1drqla-00063N-2M for ged-emacs-devel@m.gmane.org; Tue, 12 Sep 2017 15:22:38 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44628) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1drqlT-000632-4y for emacs-devel@gnu.org; Tue, 12 Sep 2017 15:22:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1drqlP-0008NP-4Y for emacs-devel@gnu.org; Tue, 12 Sep 2017 15:22:31 -0400 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:48132) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1drqlO-0008Kr-QZ for emacs-devel@gnu.org; Tue, 12 Sep 2017 15:22:27 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id B4EAE160CEE; Tue, 12 Sep 2017 12:22:25 -0700 (PDT) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id v9IapJ_E4ufB; Tue, 12 Sep 2017 12:22:24 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 74986160CEF; Tue, 12 Sep 2017 12:22:24 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id xK9lgBcZbK0Q; Tue, 12 Sep 2017 12:22:24 -0700 (PDT) Original-Received: from Penguin.CS.UCLA.EDU (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 5369E1600E3; Tue, 12 Sep 2017 12:22:24 -0700 (PDT) In-Reply-To: Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 131.179.128.68 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:218234 This is a multi-part message in MIME format. --------------EC3699115127BD838BD1882C Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 09/11/2017 07:33 PM, Katsumi Yamaoka wrote: > But it might have to be documented in also the Gnus manual, as > `gnus-summary-save-article' that uses the function doesn't > specify a destination and a user has to enter the directory name. The special behavior with gnus-summary-save-article and directories (or directory names) was not documented. Although I'm not a Gnus expert I took a stab at documenting the current behavior by installing the attached patch. If we revert the Gnus change (or make further changes) then this part of the manual will need to be revisited. > IMHO, reverting the change would be better. Does file name completion (TAB) cause '/' to be appended to the destination directory when you're using Gnus to save files? That should reduce the problem, though I admit it does not eliminate it. The change was prompted by security concerns where attackers can hijack your data by planting symlinks at the wrong time in shared areas under /tmp and suchlike. We could complicate Emacs somewhat to make it more backwards-compatible in common cases such as yours; Eli is suggesting something along these lines. The tradeoff between convenience and security and maintainability is not obvious, though, and I worry that the suggestion as-is will reintroduce security problems for interactive users. Perhaps we can think of something better. --------------EC3699115127BD838BD1882C Content-Type: text/x-patch; name="0001-Tweak-Gnus-doc-re-gnus-copy-file.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-Tweak-Gnus-doc-re-gnus-copy-file.patch" >From f5671c9c2d20e538f0f0eeaffbb37e592b2d232a Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 12 Sep 2017 12:15:22 -0700 Subject: [PATCH] Tweak Gnus doc re gnus-copy-file * doc/misc/gnus.texi (Saving Articles): Document behavior with directory name targets (Bug#27986). Problem reported by Katsumi Yamaoka in: http://lists.gnu.org/archive/html/emacs-devel/2017-09/msg00216.html --- doc/misc/gnus.texi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi index 3e9b48ec65..b002f5dea7 100644 --- a/doc/misc/gnus.texi +++ b/doc/misc/gnus.texi @@ -7759,7 +7759,9 @@ Saving Articles approach (uudecoding, unsharing) you should use @code{gnus-uu} (@pxref{Decoding Articles}). -For the commands listed here, the target is a file. If you want to +For the commands listed here, the target is a file. +A directory name (ending in @samp{/}) causes the target +to be a file under that directory. If you want to save to a group, see the @kbd{B c} (@code{gnus-summary-copy-article}) command (@pxref{Mail Group Commands}). -- 2.13.5 --------------EC3699115127BD838BD1882C--