From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#16984: dired-do-rename susceptible to .../~/... hijack Date: Thu, 08 Dec 2016 18:00:16 +0200 Message-ID: <83a8c6if73.fsf@gnu.org> References: <87eh2aq60w.fsf@jidanni.org> <87pomrst3z.fsf@users.sourceforge.net> <837f8zpnih.fsf@gnu.org> <87pomjrita.fsf@users.sourceforge.net> <83pomjr63z.fsf@gnu.org> <87eg2zb860.fsf@gmx.de> <87h97vqhf3.fsf@users.sourceforge.net> <874m3vazx2.fsf@gmx.de> <87wpgoowsx.fsf@users.sourceforge.net> <874m2jpl8c.fsf@gmx.de> <87a8c7fazs.fsf@users.sourceforge.net> <8760muu8wq.fsf@gmx.de> <874m2efpso.fsf@users.sourceforge.net> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1481212880 12099 195.159.176.226 (8 Dec 2016 16:01:20 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 8 Dec 2016 16:01:20 +0000 (UTC) Cc: michael.albinus@gmx.de, 16984@debbugs.gnu.org, jidanni@jidanni.org To: npostavs@users.sourceforge.net Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Dec 08 17:01:12 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1cF18B-00020l-Qh for geb-bug-gnu-emacs@m.gmane.org; Thu, 08 Dec 2016 17:01:11 +0100 Original-Received: from localhost ([::1]:47478 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cF18F-00051q-Sc for geb-bug-gnu-emacs@m.gmane.org; Thu, 08 Dec 2016 11:01:15 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58600) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cF187-000500-6w for bug-gnu-emacs@gnu.org; Thu, 08 Dec 2016 11:01:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cF182-0002TA-Hl for bug-gnu-emacs@gnu.org; Thu, 08 Dec 2016 11:01:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:47566) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cF182-0002Sx-Fd for bug-gnu-emacs@gnu.org; Thu, 08 Dec 2016 11:01:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cF182-0003uE-6X for bug-gnu-emacs@gnu.org; Thu, 08 Dec 2016 11:01:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 08 Dec 2016 16:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16984 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch confirmed Original-Received: via spool by 16984-submit@debbugs.gnu.org id=B16984.148121280514902 (code B ref 16984); Thu, 08 Dec 2016 16:01:02 +0000 Original-Received: (at 16984) by debbugs.gnu.org; 8 Dec 2016 16:00:05 +0000 Original-Received: from localhost ([127.0.0.1]:34732 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cF177-0003s9-9n for submit@debbugs.gnu.org; Thu, 08 Dec 2016 11:00:05 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:39084) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cF174-0003r8-3u for 16984@debbugs.gnu.org; Thu, 08 Dec 2016 11:00:02 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cF16y-0001tQ-6g for 16984@debbugs.gnu.org; Thu, 08 Dec 2016 10:59:57 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:41933) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cF16s-0001rt-2R; Thu, 08 Dec 2016 10:59:50 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2372 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cF16r-0006Yi-8X; Thu, 08 Dec 2016 10:59:49 -0500 In-reply-to: <874m2efpso.fsf@users.sourceforge.net> (npostavs@users.sourceforge.net) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:126741 Archived-At: > From: npostavs@users.sourceforge.net > Cc: 16984@debbugs.gnu.org, Eli Zaretskii , jidanni@jidanni.org > Date: Thu, 08 Dec 2016 09:39:35 -0500 > > (defun minibuffer-maybe-quote-filename (filename) > "Protect FILENAME from `substitute-in-file-name', as needed. > Useful to give the user default values that won't be substituted." > (let ((local (file-remote-p filename 'localname))) > (if (and (not (string-prefix-p "/:" local)) > (file-name-absolute-p filename) > (string-match-p "/~" local)) > (tramp-quote-name filename) > (minibuffer--double-dollars filename)))) Is the argument guaranteed to come from expand-file-name? If not, it should also accept file names matching "\~" on MS platforms. Thanks.