From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id gCCYJu2l+WWruwAAqHPOHw:P1 (envelope-from ) for ; Tue, 19 Mar 2024 15:49:17 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id gCCYJu2l+WWruwAAqHPOHw (envelope-from ) for ; Tue, 19 Mar 2024 15:49:17 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=oqYR6UNU; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1710859757; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=pw9L/gfF9XHKbGZM+PYcaJLLDgwL9cgET76nfva4I7s=; b=pnTCCV3ZV/CinStO4kC4Qvh3kfLj9VdVjJk/kJncF6f/b28tm8frVQd5nea51VXYGXaBEG M80Gehk1mSXZclnjaC2VfSjUZd7N6YEu9SolTdceHTSQsG1XDYhiyQI8ZrtZQ3hlSIquBr 3S5XG6eOLxkaJBHQ+dRBxC3vyWBwJLXUG/o3P/U9al2LKjh0dAOmfe1Utk+tlE28TS0FE5 1hxksQBy9+nJsaFp95YYa4ftBghm9xTGNKPvOr9himUh5IUM4f5Nv4qPLnIBdsNfdfU1cT iq4U8OR6xGPN74uJXIkhjoE8QPjVPDJkBwHLNFdn/7e4DocY+ssekp1izFlyOw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1710859757; a=rsa-sha256; cv=none; b=EQp99gmYSoNpWpSXh57np27+9FXbzkp22Bk5o0y8dArLIRQOdNQP6b0WycBNL7+zEHsvHb S/8LwGQLMNFWwTujyLGGmY5mY3m+KKGANO53VEI+zXTsboipemYsFqR8XmwdgCYYna+plK 2cPUvbsSPhkEb9G8/Vgb7Aj67DpnuYqgDSs8eDIS0VbgLFtuUQEg7et4sUWhAHQRQkq8fL XfQfr8LeoPWd3hA6nIQeIaXKCrvV9irWAF8kZeFiQsBTtVo+moot27+Wz6JqpO7npLELfi DmaiTMNSL/DLihMQkVLdZzm1ILBtqRdmrql6R0xP4GXZOJ4T0J+AnLBqR/PM4Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=oqYR6UNU; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 6E86F6963A for ; Tue, 19 Mar 2024 15:49:17 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rmalR-0004QJ-TJ; Tue, 19 Mar 2024 10:48:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rmalP-0004Ps-U3 for emacs-orgmode@gnu.org; Tue, 19 Mar 2024 10:48:27 -0400 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rmalN-0003Aa-7E for emacs-orgmode@gnu.org; Tue, 19 Mar 2024 10:48:27 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 4E535240027 for ; Tue, 19 Mar 2024 15:48:23 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1710859703; bh=6ZZb0L2nWb9+nSEB6OfVYuA1fBavPvMNn5k/USSs5Ns=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=oqYR6UNUPrKxjjvrjk5DfpqIjc4se/VvDj6eS+tanjaDO1JW4+AQSZPjU8YqT59P3 C1jUy666BV2BpshMerYswV/zLeTSp6mD1s9QreIGJ11sKyJGc72CljGhaNoSQfc3+w DRoErytfFlDKsVos3zxOCJPs4H63i6XaeExL2kaLTluC8lV9wUcvENAxJEYLOqGK2n e49OpseTfoOT/GQxsHxno8Qv4NqcpgAFJtshnDT2alMLYfPEuooqHehf0Vvk/3T/+L QUb8l515foD8QOqTCpzTJTGNFR7fF4DGpd8jxlxzC+Deuic3fVSMNg67Besw+VnLDN J07jyti6PPSYw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TzZN600t7z9rxB; Tue, 19 Mar 2024 15:48:21 +0100 (CET) From: Ihor Radchenko To: Max Nikulin Cc: emacs-orgmode@gnu.org Subject: Re: Warn about shell-expansion in the docstring of org-latex-to-html-convert-command In-Reply-To: References: <87wmr1rc2w.fsf@localhost> <874jdzjqkk.fsf@localhost> <6e49c590-ad27-4fb0-b1f2-6a89c60a0b58@gmail.com> <87msrncxhq.fsf@localhost> <735645dd-1ddf-4579-a6dd-2700f3e83c94@gmail.com> <87jzmdht2w.fsf@localhost> <87v85rd2m2.fsf@localhost> <87v85nip0g.fsf@localhost> Date: Tue, 19 Mar 2024 14:48:19 +0000 Message-ID: <87plvqwa4s.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -9.50 X-Spam-Score: -9.50 X-Migadu-Queue-Id: 6E86F6963A X-Migadu-Scanner: mx11.migadu.com X-TUID: 6/qiOQwk+2Da Max Nikulin writes: >>> On 12/03/2024 20:03, Ihor Radchenko wrote: >>> - '%i' and "%i" in any position including e.g. --option='%i' and >>> protocol:"%i" >>> - 'something%i' and "something%i" surrounded by spaces or at the end of >>> command but with no spaces in "something". >> >> I am not confident that it will be safe. For example, consider something >> awkward like foo\"%ibar\". I imagine that other edge cases are possible, >> especially in exotic shells. > > I think quotes should not be stripped in such peculiar cases. The > variants I suggested do not match it. Is it realistic? I am afraid that there are other peculiar cases. I do not know how to determine which case is peculiar and when it is safe to strip the quotes in the code. I feel that if we do try to strip only "safe" cases, we will introduce subtle bugs and then introduce even more breaking changes by fixing those bugs. It is more robust to not strip the quotes at all and go ahead with breaking change. >>>>> - I expected it as bugfix. >> >> It does not matter that most users will not be affected. Some users >> being affected is enough to not commit this to bugfix. Our policy is not >> to commit unsafe changes that may break existing configurations to >> bugfix branch. Except critical fixes. > > Reasons why I consider this issue a severe enough: > - Something weird may be executed as shell commands > - Incorrect formulas in exported documents are more than just > disappointment. An example of complain related to another bug: > Re: Inequalities in math blocks. Wed, 06 Oct 2021 09:39:23 +0200. > https://list.orgmode.org/m2bl42bo0k.fsf@me.com I do not see these reasons as _critical_. In my mind, critical reasons would be (1) Org mode completely broken for many users (it is not); (2) Security vulnerability. This particular case seems to be subjective, so it is a judgment call. If you insist that the fix should land on bugfix, we can add Bastien to the discussion to get a third opinion. >>> emacs -Q --batch --eval '(find-file-noselect "not-found.txt" t)' >>> Error: (file-missing "Searching for program" "No such file or directory" >>> "git") >> >> This looks like Emacs bug. Likely in `vc-refresh-state'. > > It as an Emacs bug that missing git executable leads to a fatal error. > > It is a bug in Org that some hooks are called when just file content is > necessary. I would not necessarily call it a bug, but I do not see downsides of using `insert-file-contents' instead of `find-file-noselect' and not running `find-file-hook' in this particular case (other cases in Org tree appears to be fine from a quick glance). -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at