From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: taylanbayirli@gmail.com (Taylan Ulrich =?utf-8?Q?Bay=C4=B1rl=C4=B1?= =?utf-8?Q?=2FKammer?=) Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Add shell-quasiquote. Date: Mon, 19 Oct 2015 15:53:42 +0200 Message-ID: <87mvvfm0bd.fsf@T420.taylan> References: <87si59wj42.fsf@T420.taylan> <878u6znii9.fsf@T420.taylan> <877fmjj9p6.fsf@fencepost.gnu.org> <87zizfm2dq.fsf@T420.taylan> <871tcr7yvq.fsf@fastmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1445262842 14426 80.91.229.3 (19 Oct 2015 13:54:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 19 Oct 2015 13:54:02 +0000 (UTC) Cc: emacs-devel@gnu.org To: Random832 Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 19 15:54:02 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZoAsz-0003yG-9Z for ged-emacs-devel@m.gmane.org; Mon, 19 Oct 2015 15:54:01 +0200 Original-Received: from localhost ([::1]:39622 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZoAsy-0008Je-OR for ged-emacs-devel@m.gmane.org; Mon, 19 Oct 2015 09:54:00 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41971) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZoAsj-0008JY-Sn for emacs-devel@gnu.org; Mon, 19 Oct 2015 09:53:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZoAsj-0004gr-1C for emacs-devel@gnu.org; Mon, 19 Oct 2015 09:53:45 -0400 Original-Received: from mail-wi0-x233.google.com ([2a00:1450:400c:c05::233]:36511) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZoAsi-0004gn-Qy for emacs-devel@gnu.org; Mon, 19 Oct 2015 09:53:44 -0400 Original-Received: by wicfx6 with SMTP id fx6so6961001wic.1 for ; Mon, 19 Oct 2015 06:53:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type:content-transfer-encoding; bh=QqkQgNRgi/cn+2HmYqkapGJvvgE9kDjeWNh+9Tkubf8=; b=OZhwuzeA8NBvsw5WLtYSEW+X9YHkA2SoUFPAfR4K2kI0HeSHxOuF8c2nDki8v6wTmo HC0e7cv+gGB5gTtDjwMv5UZBWBYSmnoaJJPytgcOiTTR0Vlo/HdfoFExleXtB/AHMqbz skB1LsGDmyWtuyzzx5xOUny7Q4X0I06YFQkHSy7aKqBEyV79uawcsiK7+HIQxpZlXPe+ eneieqK8buF5A8Xwp6005JEkC2EQ9w8iaaqJjNNrByk+l2w+iLWBWD4ugW/1L/I/1k2H Ww7E8Aql5ehP7htr3twD2QbV4CDm7DhVZB6a2Kg/sdfKgQk911lgqQhA3FJ9awY30Drm Jywg== X-Received: by 10.180.12.206 with SMTP id a14mr21986951wic.25.1445262824185; Mon, 19 Oct 2015 06:53:44 -0700 (PDT) Original-Received: from T420.taylan ([2a02:908:c32:4740:221:ccff:fe66:68f0]) by smtp.gmail.com with ESMTPSA id o3sm15134580wif.22.2015.10.19.06.53.42 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Oct 2015 06:53:43 -0700 (PDT) In-Reply-To: <871tcr7yvq.fsf@fastmail.com> (Random's message of "Mon, 19 Oct 2015 09:48:25 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c05::233 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:192098 Archived-At: Random832 writes: > taylanbayirli@gmail.com (Taylan Ulrich "Bay=C4=B1rl=C4=B1/Kammer") writes: >> It was not criticism of shell-quote-argument (those are separate). >> Indeed it quotes arguments. My variant also quotes things that may be >> the name of the command and not an argument. > > But why does it *need* to? > > Do you realize that you are now suggesting an injection scenario whereby > the attacker is _legitimately_ permitted to supply an arbitrary string > for an ordinary command to be executed, but somehow letting them execute > "if" [which will be a syntax error anyway since they can't supply the > then/fi as separate statements] becomes a security hole? It's mostly just a side-effect of the simpler implementation. If there's a /bin/if on the system, (shqq (if blah blah)) will call it. Not very useful, but consistent. It isn't necessary for shell-quote-argument to do something like that for me to decide to use it, only the safety guarantees are necessary. Taylan