From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id ZM+DBpSz8GNiGgAAbAwnHQ (envelope-from ) for ; Sat, 18 Feb 2023 12:16:36 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id OPi/BZSz8GMtbwEA9RJhRA (envelope-from ) for ; Sat, 18 Feb 2023 12:16:36 +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 DA19129CAB for ; Sat, 18 Feb 2023 12:16:35 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pTLCC-0004aP-QN; Sat, 18 Feb 2023 06:16:00 -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 1pTLC9-0004Zw-SC for emacs-orgmode@gnu.org; Sat, 18 Feb 2023 06:15:58 -0500 Received: from mail-lf1-x129.google.com ([2a00:1450:4864:20::129]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pTLC7-0002nj-Dj for emacs-orgmode@gnu.org; Sat, 18 Feb 2023 06:15:57 -0500 Received: by mail-lf1-x129.google.com with SMTP id b1so763731lfs.8 for ; Sat, 18 Feb 2023 03:15:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=WAsP2sd/Uvgdh54wGGXkxUVC1sqJKIvcNJCy3sH6Bnw=; b=GkvXgCQDN25ZQmhx9Cp08ueo8IAeiof2Kvz8nPG+jtvXzuz5ASARoX+7PsZ0HcRScr wIgkm4EOaM9yQiXV263zmB7pwAEZMr6Vf3HP5g1c3ii4/KJRaDfOq0J8HdiNV9QSKKfm +t40ogwW8nE0vJmRVbmruCSDIWE+v4D/+Rj68oAkfun/ASAry7mUxx36KSqoKh7gB+S7 e8fqZoTlle4xx4sKj3I81wnuGGMhu7YhZwJkU24pgxiMpN6yLfsyczsAccFt/76PyvBB 1qA2eG9WLQPn6w4/fCeUiJ00xOKDWDNCUZvjX0OMDiBE18S0SUlANPQl6hgS633ggGG5 NCxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=WAsP2sd/Uvgdh54wGGXkxUVC1sqJKIvcNJCy3sH6Bnw=; b=Oe9C23iuighRQg+AAdnl61qKAYmx6bVuKAIa+MjyJnS8PhWY5/AFDjdhvI5Z+54KlP 07SWuL8T/8hLz9a/px8vT0fvM5BoRw60iX/VtInQIaKNZLOcooDSZvsRXX7a2IsWLg2A M+Fhj+XlirEegwAEx+o2E9/7WL5pWzmRnJ+bCYYtJbvHGIOV6V8TAfxuZmxPLqHNrO/Z PtmEiAakPEzbOxZQI7A2gm9ZTAYyeinC3ooJoaVPXtP0UqfEQYC3h5LDybKMjEOlbNMT j4MVrTIfuhyzY0WBuKhBTjtDa/K/7eVci1Ukow8kCeyZY0+VdggjAUFSfGm3zxeN78oL w9WA== X-Gm-Message-State: AO0yUKVfRRHtDhD3skLVHjsCOHWsIuC7I5iml0u+iuCrtd15c/2th8Yo /JwU3iRZeISAVhZmIyMt5Io= X-Google-Smtp-Source: AK7set9Tpymu72j0CETHychO+XDGw5ttkQXWo+MeBuKjDa9wIJwm1V99x9qFh3/C3q/a5V3uZcp6CA== X-Received: by 2002:ac2:5a11:0:b0:4b4:b5bf:3ce6 with SMTP id q17-20020ac25a11000000b004b4b5bf3ce6mr773825lfn.38.1676718950347; Sat, 18 Feb 2023 03:15:50 -0800 (PST) Received: from [192.168.0.101] (nat-0-0.nsk.sibset.net. [5.44.169.188]) by smtp.googlemail.com with ESMTPSA id l13-20020a19c20d000000b004b550c26949sm956092lfc.290.2023.02.18.03.15.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 18 Feb 2023 03:15:49 -0800 (PST) Message-ID: Date: Sat, 18 Feb 2023 18:15:48 +0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Subject: Re: [PATCH] Fix ob-latex.el command injection vulnerability. Content-Language: en-US To: lux , emacs-orgmode@gnu.org References: From: Max Nikulin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=2a00:1450:4864:20::129; envelope-from=manikulin@gmail.com; helo=mail-lf1-x129.google.com X-Spam_score_int: -23 X-Spam_score: -2.4 X-Spam_bar: -- X-Spam_report: (-2.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, FREEMAIL_FROM=0.001, NICE_REPLY_A=-0.256, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1676718995; a=rsa-sha256; cv=none; b=JSjSBBU8b0Jbap5pRH90fXAPp13XyOo9GmA9hsZMu4vRp7CYIVBmZwh1IJHp0J8VtDGlTX 1nh4r+aerYQgVbGNmiSvkb9X56xEGR7iMghN3vRlh+4tcpM+uyIlVj38N3rvHkR4D6LFZD p6s5ZKYBP8UcM4sSPY4kUSLpR3o/d/RzGaC3AbhqwBRr69WaU13Qwq4gW8/6eL3gds/YKL MllNA8RH4pevV6KscDQ8mZCixUhyLv25dEMyv5LL9GcHax8esNU+BK2luXnQZF6su6rzR3 4WEdkCXkUYDPpZlZ1Eclx7hWqWIHwTcysb6hhhShQrTtjOFDMntR8cX4bUjXrQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=GkvXgCQD; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=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=1676718995; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=WAsP2sd/Uvgdh54wGGXkxUVC1sqJKIvcNJCy3sH6Bnw=; b=cJpDl8hr7Re7/W9pgHMPgv7edWhXVN7DUjQRntu2HyhlPW8erFtcUWSzczIJ6WNSBrzeLr S8PpKMlZhaGyw0+eQ3MlgEMkTAadgJ1KsvWWCsQf1DMLA+HcS6hM4JaylBa0rFmyknnvSJ RITGuyqawWn1KxwIuNBxYij3k5DOHdjXff+jxWdTaWO3cbRZEzsGJV2CV4hn4vc5La+QfC QGIA7JlW5h6KXI7PY1WEl5Ik8Hd+xISL5c8tUUeKCeCPvFZ5ykV26pRt/2P4oRjcEhEFS0 if8VsUIyAZQHLd9FWmbWyQFT9SHEhNFvzMy4k2DED9KEz/W/pjYFgLGrItbRzw== X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=GkvXgCQD; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=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" X-Migadu-Spam-Score: 7.57 X-Spam-Score: 7.57 X-Migadu-Queue-Id: DA19129CAB X-TUID: i1StJYmc3iwx On 18/02/2023 17:08, lux wrote: > - (shell-command (format "mv %s %s" img-out out-file))))) > + (shell-command (format "mv %s %s" (shell-quote-argument img-out) (shell-quote-argument out-file)))))) Thank you for the patch. Certainly it is an improvement. Is there any reason why `rename-file' should be avoided here? I just have discovered this function, so I am unaware of possible pitfalls. (info "(elisp) Changing-Files") https://www.gnu.org/software/emacs/manual/html_node/elisp/Changing-Files.html#index-rename_002dfile