From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id sNIrM6wODGTiLwEASxT56A (envelope-from ) for ; Sat, 11 Mar 2023 06:16:28 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id IDIgM6wODGS/qwAAauVa8A (envelope-from ) for ; Sat, 11 Mar 2023 06:16:28 +0100 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 22ED424C62 for ; Sat, 11 Mar 2023 06:16:25 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=qq.com header.s=s201512 header.b=g66WEBGZ; dmarc=none; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1678511788; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=/9mxVsrWYobUGrvurAh0/rtGnHoTaxYsLfemlIucHCc=; b=iIZ3uC9EOLVsJivpKeOnDTv6Kp/1L5HGJmQRAq9UkVM2nhfIyyUv1OzAJI2R5aMRHocIZf Ej/Bji/P/NoFrlKgJSRT6LpHUG/M61AzJ3R/i0QbM3q9BxMKVCy0SbfZGR3I0Yu51KVDRl EQUUcdIZUc8ULgFvVCihw0B/e6Om3a7DPQjMC5Wn8EZKmdXUocSzsXgucUJTwBn9snRc+c v/LRC50PFkOrWaNmJ066A5mhJIrOQUWVIY8iY9GRvgBapgmMjXw+qt/+nOtlLVfR8iXMd8 tlvIwLI2h/6hPa65i/+nHqrAyFO1yKPmwhwpy7sOAKkBlBhb8U5bHX762gSK8Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=qq.com header.s=s201512 header.b=g66WEBGZ; dmarc=none; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1678511788; a=rsa-sha256; cv=none; b=HhAVBn1GQhUdnhRxu1DISly9c3xFg23A9UzudA8aKQsxAuHe1tzxH3fBliP2bMArwpyDWf UJKrpxLvrym8YqtvgsT9MdUj9GHExigypHU8qMPvel0mR7DxDM63Ol4EtDwwey9t32xC24 wBE240EoKeZZiaSxfMqhWic55E7b4RUaSE7rn6MVA5CLUJJi829S/RmEtqcBpLqOBasLWm RgWBqaZMSw4EH0oo4YXvKKFzEUbeC7lTUzPiz/wJScajFCFkG9/TdtDTb6r8s9BKSaxW3F ug8iM6QiHzrbxbGXOtRb64o2X0sK/NE3u5WjbSYTtuESAlGucTBduu20+xi4Aw== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1parZp-0006W0-1P; Sat, 11 Mar 2023 00:15:29 -0500 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 1parZm-0006Tm-UG for emacs-orgmode@gnu.org; Sat, 11 Mar 2023 00:15:26 -0500 Received: from out203-205-221-242.mail.qq.com ([203.205.221.242]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1parZg-0001wT-3z for emacs-orgmode@gnu.org; Sat, 11 Mar 2023 00:15:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1678511699; bh=/9mxVsrWYobUGrvurAh0/rtGnHoTaxYsLfemlIucHCc=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=g66WEBGZ+aMnegqe+2kufHOUG5xRDbuF56uBNPq8koNi1wk1nTz7tYj4EzVDt2tst abKUiEWwSppmA4+L1oyiW+9DhXklUKw5AUtiqtiRbm1QTxxm9UO6i2IbxK+aOnVuJw 9toM+hh5HEAS1P/jmDLHdQZtUB/gdRVmO1cZY1+c= Received: from [IPv6:240e:399:e6f:ee32:f815:4044:ba50:97f9] ([240e:399:e6f:ee32:f815:4044:ba50:97f9]) by newxmesmtplogicsvrszc2-0.qq.com (NewEsmtp) with SMTP id 32FB5249; Sat, 11 Mar 2023 13:12:47 +0800 X-QQ-mid: xmsmtpt1678511567tmcbfop1m Message-ID: X-QQ-XMAILINFO: M8F5Ju5R+mONzkovQq7wyyEBUyofT7hIXafeiIa4cK1Ncbrx0vd9kZ0Zv2QqOI IJpSCvt21+SNNJ36zFusWmwRrdL4s1RD0fpLwx4k+f57972ZTC0AvmFrJUv2UBk5+tc1gRKQ1kq7 e1Rggiag5ZaaV+ZbQPPqoFxNXD+4chsfgNJr6tB+AHRvLFvEB80cVxI4MO1QfCo8gFqxCpUY4Tnh TdC31aUiiCsCrlpFEsAu0wkbdMNFojTFnqLj92opRlGmEu47RxuSZd0eWra0NCOcgwF2K5fdvUaJ AL1nECggmnDs5i/gsBo55t7lnNGSXPnzGQnewywpwc6cWlQzldnOWdn3S3qk1nGiTRFegpGmL2ka MbbsVoEKrfGgTT3pDQ+DroLlnY0Bl1FHfXa3R1lzCGVzuwt0b03Uu0dYV+aA67y0por8YZtHeJ0F nl5m3svt/u45dR9u9JiFjptc1150OoTSWkumcg0XtoZeB99bFCuIS81wjOu4lYYmcrs7U+cdj20y H0Ow36w6LerAEE03SlB4TjTFC+WEmUiAS8xRLLabvz30X32CpznKUSThdaWbjnzObjDaYNN2HobA WBmc39Aeo/3sxj2TUkGXhq+fYntQazlR4O4HBHn8mAl+hsOZvULkSD3XtI3+81oQhvD9Z66RexeZ C/MFZQrIIGAR9RThcSgtwxzij6W+EbxrIeI6oX3DZT3m4eC7FrjRJFvlH+10dluaB0oGVKSMMxZm dQXUHn6pAWHn/cNddW7E0XaJEuw6t9YaK2z5jrstL2moXcb20a0zejv3uUUpRLzym8YYMN3PhEM/ OVcIPmsDoeyMnCz8R8LZCIrOsMQbcchhRD2JFrzO2HTasRRiMQChtr+XVXJ6XhjCV7KXDywlvo79 cm8j6m4pjK6I0aXqXB5o2jKnyHWhjzARkH/QDBckoK0xxRgD+fScp6Mi+nMu0QidwK1TxLCEVKyG tDpqFcOz4= X-OQ-MSGID: <922a9253581650ac1c1d3840abbaafb84a68dabc.camel@shellcodes.org> Subject: Re: [PATCH] Fix ob-latex.el command injection vulnerability. From: lux To: Ihor Radchenko Cc: Max Nikulin , emacs-orgmode@gnu.org Date: Sat, 11 Mar 2023 13:12:47 +0800 In-Reply-To: <871qlyqfm0.fsf@localhost> References: <87v8jzjj1p.fsf@localhost> <047b7367-c98f-e531-b3e9-bc50b6b098e5@gmail.com> <871qlyqfm0.fsf@localhost> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.4 (3.46.4-1.fc37) MIME-Version: 1.0 Received-SPF: none client-ip=203.205.221.242; envelope-from=lx@shellcodes.org; helo=out203-205-221-242.mail.qq.com X-Spam_score_int: 10 X-Spam_score: 1.0 X-Spam_bar: + X-Spam_report: (1.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HELO_DYNAMIC_IPADDR=1.951, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_DYNAMIC=0.982, SPF_NONE=0.001, T_SPF_HELO_TEMPERROR=0.01 autolearn=no 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: X-Migadu-Queue-Id: 22ED424C62 X-Spam-Score: -6.82 X-Migadu-Spam-Score: -6.82 X-Migadu-Scanner: scn0.migadu.com 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-Country: US X-Migadu-Flow: FLOW_IN X-TUID: nVTYAOXTAxkn On Thu, 2023-03-09 at 12:22 +0000, Ihor Radchenko wrote: >=20 > im-in-options and im-out-options, according to > https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-LaTeX.html > , > are options passed to ImageMagick. >=20 > However, for example, (shell-quote-argument "-enhance -strip") will > return "-enhance\\ -strip", which is not what we want. >=20 > Similar problem with other instances of `shell-command' in Org where > header args supply command line arguments. Like in :cmdline. >=20 I think there is only a need to deal with the problem of `\\ ', for example: (string-replace "\\ " " " (shell-quote-argument im-in-options)) Any better suggestions? Thanks.