From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Demi Obenour Newsgroups: gmane.emacs.bugs Subject: bug#19350: #19350 24.4; Incorrect quoting of %-signs for Windows command shell Date: Wed, 17 Aug 2016 22:02:55 -0400 Message-ID: References: <87k2fmyg16.fsf@users.sourceforge.net> <87shu6vi54.fsf@users.sourceforge.net> <83twemf550.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11488d8cf599c4053a4efac4 X-Trace: blaine.gmane.org 1471485860 27321 195.159.176.226 (18 Aug 2016 02:04:20 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 18 Aug 2016 02:04:20 +0000 (UTC) Cc: 19350@debbugs.gnu.org, Noam Postavsky To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Aug 18 04:04:16 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 1baCgp-0006uS-Hr for geb-bug-gnu-emacs@m.gmane.org; Thu, 18 Aug 2016 04:04:15 +0200 Original-Received: from localhost ([::1]:50307 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1baCgm-0003oX-OL for geb-bug-gnu-emacs@m.gmane.org; Wed, 17 Aug 2016 22:04:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56058) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1baCgf-0003oR-Vb for bug-gnu-emacs@gnu.org; Wed, 17 Aug 2016 22:04:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1baCgc-0000Jo-NZ for bug-gnu-emacs@gnu.org; Wed, 17 Aug 2016 22:04:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:34694) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1baCgc-0000JK-Je for bug-gnu-emacs@gnu.org; Wed, 17 Aug 2016 22:04:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1baCgc-00024v-5d for bug-gnu-emacs@gnu.org; Wed, 17 Aug 2016 22:04:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Demi Obenour Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 18 Aug 2016 02:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19350 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: wontfix confirmed Original-Received: via spool by 19350-submit@debbugs.gnu.org id=B19350.14714857837907 (code B ref 19350); Thu, 18 Aug 2016 02:04:02 +0000 Original-Received: (at 19350) by debbugs.gnu.org; 18 Aug 2016 02:03:03 +0000 Original-Received: from localhost ([127.0.0.1]:60638 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1baCfe-00023T-UO for submit@debbugs.gnu.org; Wed, 17 Aug 2016 22:03:03 -0400 Original-Received: from mail-ua0-f194.google.com ([209.85.217.194]:33016) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1baCfd-00022z-7U for 19350@debbugs.gnu.org; Wed, 17 Aug 2016 22:03:01 -0400 Original-Received: by mail-ua0-f194.google.com with SMTP id u13so1117246uau.0 for <19350@debbugs.gnu.org>; Wed, 17 Aug 2016 19:03:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=u8thl3HnQ41L+JnVvrPs8Gnxpe2n9Fv0SncvpHJr7R8=; b=Ve6x4KS/81EE2FCJZZyoTPrxSYTHGBDyLQ8JJ2KZGimdufouNljRhisV3hGhHB12zp TXRX5h6RnzdLngBZgeokNuk7Rlgus+7uA7lsjWplEs2x+FniEmlkNWoVoNbHIZG+Ih7T owiOq9QQ/ZZngkdk6bw2cb3srfhy9pjYA0E8Ko2HZFR7X//dK1exv22gexzMPT9kv0K2 C2qjpo2eo5h289I4pqSWE/fJ+yohd0sFSVqE5pM6PCq2VluadFImHU7VJXYiytH6VKc/ YlOyCRLMQUcrgss2DrCgigrwFOp/7M9vb+MR06F+56NP3t2tA7VJvc4e0RuYf1EIbz5H Frjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=u8thl3HnQ41L+JnVvrPs8Gnxpe2n9Fv0SncvpHJr7R8=; b=DuG04odGrOUZ2LITIKIWTScIbJEFEyI71zrrY7l+/xZ5mu2h5SOwdwWCtGAoqITo3P o1G+hKvA1TYfYT5jOFJA5h1auXxLecLf8pbY2SsnyNzfaIg6MA/8AyXqOTBhO7LDigwj a+PlllF5SKsQpRgz+my3SAp0GjTYDhlgkzRhAaLn8clKBcn16JUudyWeo0sducyj+lWm 2y13tL6fsyvoFMXNlYhuHPquvUC9MCg1twN3YXDG7lVQ7ZQ6En/k8neenl7dH+nhIBhd 2lyKfshY3n6ff3vAcFIbRY6CRgmWcrgC/EuGFrZ6pQsfdQPsB3VsU5LjUI0/tpxmdXhG QByQ== X-Gm-Message-State: AEkoouvjdhgyd0D4mGH/iy3IJEDlugVxlSJFDdT072GhFuw+wSI/Nw8l4fGj7w/uZyC40fpFQzhOp9ID0TuBhA== X-Received: by 10.31.200.198 with SMTP id y189mr20000650vkf.118.1471485775811; Wed, 17 Aug 2016 19:02:55 -0700 (PDT) Original-Received: by 10.176.69.131 with HTTP; Wed, 17 Aug 2016 19:02:55 -0700 (PDT) Original-Received: by 10.176.69.131 with HTTP; Wed, 17 Aug 2016 19:02:55 -0700 (PDT) In-Reply-To: <83twemf550.fsf@gnu.org> 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:122338 Archived-At: --001a11488d8cf599c4053a4efac4 Content-Type: text/plain; charset=UTF-8 But *nix has no such feature, nor the associated gotcha. On Aug 15, 2016 11:01 AM, "Eli Zaretskii" wrote: > > From: npostavs@users.sourceforge.net > > Date: Sun, 14 Aug 2016 23:13:43 -0400 > > Cc: 19350@debbugs.gnu.org > > > > Hmm, maybe we could fix this by making Emacs refuse to apply environment > > variables with names ending in carets? > > I'm very much against disallowing perfectly valid (if rare) use cases > just because someone malicious can take advantage of that. > > From my POV, as long as Emacs itself doesn't produce such shell > commands and/or environment variables for any of its features, > avoiding this becomes user's responsibility, just like when working at > the shell prompt. Of course, if we can find a reliable solution to > the problem that doesn't take away features, that'd be better, but > failing that, I'm okay with leaving this alone, perhaps documenting > somewhere that using % in shell commands when there are environment > variables ending in ^ could produce surprising results. > > Thanks. > --001a11488d8cf599c4053a4efac4 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

But *nix has no such feature, nor the associated gotcha.


On Aug 15, 2016 1= 1:01 AM, "Eli Zaretskii" <eliz= @gnu.org> wrote:
> From: npostavs@u= sers.sourceforge.net
> Date: Sun, 14 Aug 2016 23:13:43 -0400
> Cc: 19350@debbugs.gnu.org=
>
> Hmm, maybe we could fix this by making Emacs refuse to apply environme= nt
> variables with names ending in carets?

I'm very much against disallowing perfectly valid (if rare) use cases just because someone malicious can take advantage of that.

>From my POV, as long as Emacs itself doesn't produce such shell
commands and/or environment variables for any of its features,
avoiding this becomes user's responsibility, just like when working at<= br> the shell prompt.=C2=A0 Of course, if we can find a reliable solution to the problem that doesn't take away features, that'd be better, but<= br> failing that, I'm okay with leaving this alone, perhaps documenting
somewhere that using % in shell commands when there are environment
variables ending in ^ could produce surprising results.

Thanks.
--001a11488d8cf599c4053a4efac4--