From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: Emacs Lisp's future Date: Tue, 07 Oct 2014 17:40:43 +0200 Message-ID: <874mvfc2h0.fsf@fencepost.gnu.org> References: <54193A70.9020901@member.fsf.org> <87tx3tmi3t.fsf@fencepost.gnu.org> <834mvttgsf.fsf@gnu.org> <87lhp5m99w.fsf@fencepost.gnu.org> <87h9ztm5oa.fsf@fencepost.gnu.org> <87d2ahm3nw.fsf@fencepost.gnu.org> <871tqneyvl.fsf@netris.org> <87d2a54t1m.fsf@yeeloong.lan> <83lhotme1e.fsf@gnu.org> <871tql17uw.fsf@yeeloong.lan> <838uktm9gw.fsf@gnu.org> <87h9zgarvp.fsf@fencepost.gnu.org> <87mw97rjwm.fsf@yeeloong.lan> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1412696503 13753 80.91.229.3 (7 Oct 2014 15:41:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 7 Oct 2014 15:41:43 +0000 (UTC) Cc: Richard Stallman , Mark H Weaver , dmantipov@yandex.ru, emacs-devel@gnu.org, handa@gnu.org, monnier@iro.umontreal.ca, Eli Zaretskii , stephen@xemacs.org To: Andreas Schwab Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 07 17:41:35 2014 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 1XbWtJ-0007rL-B0 for ged-emacs-devel@m.gmane.org; Tue, 07 Oct 2014 17:41:33 +0200 Original-Received: from localhost ([::1]:59470 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XbWtJ-0006Rq-0b for ged-emacs-devel@m.gmane.org; Tue, 07 Oct 2014 11:41:33 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58357) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XbWsz-0006Oh-K0 for emacs-devel@gnu.org; Tue, 07 Oct 2014 11:41:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XbWsy-0007Q9-Oy for emacs-devel@gnu.org; Tue, 07 Oct 2014 11:41:13 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:42844) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XbWsy-0007Q1-Hx for emacs-devel@gnu.org; Tue, 07 Oct 2014 11:41:12 -0400 Original-Received: from localhost ([127.0.0.1]:50010 helo=lola) by fencepost.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XbWsi-0007FJ-PL; Tue, 07 Oct 2014 11:40:57 -0400 Original-Received: by lola (Postfix, from userid 1000) id A83CFE0545; Tue, 7 Oct 2014 17:40:43 +0200 (CEST) In-Reply-To: (Andreas Schwab's message of "Tue, 07 Oct 2014 17:31:58 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::e 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:175077 Archived-At: Andreas Schwab writes: > Mark H Weaver writes: > >> However, if the overlong sequence came from the network, and Emacs >> propagates it unchanged to internal subsystems[*] (e.g. via command-line >> arguments to subprocesses), that's not good. It exposes another program >> to invalid input -- a program that might not be designed for exposure to >> possible attacks via overlong encodings. > > At least it doesn't make it worse (it is unchanged from the situation if > you remove Emacs as a filter). And if Emacs is supposed to be used as a propagate-only-valid-utf-8 filter (which it definitely can do), that should be in the spec and Emacs should then programmed to do the desired failure mode. Just bombing out in some predetermined manner in some fixed location is not a substitute for properly planned behavior. If you want Emacs (or GUILE, or whatever) to take a particular action in a particular case in order to provide output with particular guarantees to particular processing stages, then "somebody thought it was a good idea" in some inconvenient place is not a substitute. Unless told differently, a tool like GUILE or Emacs, when used as a filter, should do exactly _those_ filtering operations you tell it. Not more, not less. Anything else is _guaranteed_ to get in the way eventually. -- David Kastrup