From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:1008:1e59::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id yK1TDuGYZWY0agEAA41jLg (envelope-from ) for ; Sun, 09 Jun 2024 13:58:25 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id oDQyCOGYZWaoawEA62LTzQ (envelope-from ) for ; Sun, 09 Jun 2024 13:58:25 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=D0gm1rTs; dmarc=pass (policy=none) header.from=posteo.net; 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=1717934305; 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=VzuR0onB4yE1PhhVUPxonM6/Eodai5s81QIzogBqWQ4=; b=BshCpExJrdd4yrRJ0roXIlcpJhOaaAvkS0c8nnrAUKhcUsd2jhiCeeR9sPulvyUpumiQC5 HYsUOBjpfKdJ66BGtxfnRorDFC2oxEZvu6ewDCFmpCF4dcPrmNr6j9dADu0CmyE8K+EPAU 5/KnMdpvn/23ABy9otwboDdxwRBCxzXtRNKG0k1hdgZIHla+1Ka01Z/Zg9/IktEVjkZ001 Qz7cx4MRjk+riH2XMZi/JnkKLaXHb00vGh0WoD29f2kSwOYK1wWLaS8ZmGgVUYVhkpCEhN 1JsDlBBAAb7QoBmZ84d/vo2E+J4IgQy/A5aW1SuunZIXqhNgqlG1m/mvmnmPtw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1717934305; a=rsa-sha256; cv=none; b=C72q2hK09Y+yoQ2BqDduKpcjKHUnWMgDgbUmK7DWkJchczEhB9wF609s7wF6GbEW2WHoJk RQrg/Oa/1M3CC4FJOMQFUXF2H9j9B+KhwKGI3oa/IDQ4FyWL7v7evd9ybOtdygey4krfYD XNK3LYJ1euPoVehEKZm/IjdtDWw4CvoNvg5vybSVKfJY7C6h5cPY6yoPHF++ADkWwfedb4 9btD3AsTd58RgHIi+SPpFp45Wa4gPKMMzfibT5I4WD0VluOOZp4U4gPLV5WScQSf4EU35Y s7HKWxyyzQfcCp5dJItIPhlWWhrU2AIev+LQOjNJZjiI9RVIPIUobGzam/D0+w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=D0gm1rTs; dmarc=pass (policy=none) header.from=posteo.net; 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" 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 840B67D0E6 for ; Sun, 09 Jun 2024 13:58:24 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sGGp6-0003RV-AM; Sun, 09 Jun 2024 07:34:56 -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 1sGGp4-0003R9-E3 for emacs-orgmode@gnu.org; Sun, 09 Jun 2024 07:34:54 -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 1sGGp1-00024m-UA for emacs-orgmode@gnu.org; Sun, 09 Jun 2024 07:34:54 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 2401924002A for ; Sun, 9 Jun 2024 13:34:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1717932889; bh=S8tPz38wlfh8W0TUovTL+M09a03tAD3At9hGNp69Cag=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=D0gm1rTsUHRWHMrNh5J3U+wul2MCITv32A1Yscv2xv6HjN0b3oDz92jPljc7IgqcX DWacDRmPDvc/WB12VMCvVzlP8MN2fS8g4T2E7X7Oy7uzdVx7TdL/p2DRXowtONb6+F aFhGOu8TdvfS1ysgMJnl2n25uWyeA6E6D/W2Md5l2E3Y2CR0lFMiSJsINzhYgbmYiE FuPQECjmuC0LM/x2k0RO+5HOEf+j10YkIEAkYPCVeknxcCO0twlrhXYG009e+Svqyr 94SPek86x/AoolTWGx+BWYfMN5SFYIBd6OOp+IRudw9q34uEUuWhuBn7s8NisZTjRx b4lgy830i5blg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4VxtBw36l9z6tyM; Sun, 9 Jun 2024 13:34:48 +0200 (CEST) From: Ihor Radchenko To: Bastien Guerry Cc: Sacha Chua , emacs list , Timothy Subject: Re: [DISCUSSION] Add "Recent News" to orgmode.org In-Reply-To: <87le3e4iyp.fsf@bzg.fr> References: <877cjk10gs.fsf@localhost> <87wmqudjaw.fsf@bzg.fr> <87v85vkdn4.fsf@localhost> <874jdf4xb1.fsf@bzg.fr> <87sexnw8wr.fsf@localhost> <87le3e4iyp.fsf@bzg.fr> Date: Sun, 09 Jun 2024 11:36:25 +0000 Message-ID: <87r0d62vra.fsf@localhost> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" 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.01, RCVD_IN_MSPIKE_WL=-0.01, 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: -6.56 X-Spam-Score: -6.56 X-Migadu-Queue-Id: 840B67D0E6 X-Migadu-Scanner: mx11.migadu.com X-TUID: /WGL39MBxtPN --=-=-= Content-Type: text/plain Bastien Guerry writes: >> However, the page did not get updated. May you please check the build >> logs? Is there anything fishy going on there? > > https://builds.sr.ht/~bzg/job/1246209 still says: > > "The remote resource "https://tracker.orgmode.org/news.org" is > considered unsafe, and will not be downloaded." > > I've committed this: > > https://git.sr.ht/~bzg/orgweb/commit/f494af7c2f > > Perhaps there is a buggy combinaison of `org-resource-download-policy' > and `org-safe-remote-resources' in general, in which case this needs > to get fixed -- I didn't test further. If this does not work, I will > have another look this afternoon. I think that the old regexp was simply not accurate. In particular, the trailing \' prohibited all the Urls other than literally https://tracker.orgmode.org. That said, it is annoying that Org mode did not provide a clear indication that something is fishy other than a simple message. Attaching tentative patch that makes Org mode throw an error when a prompt is requested for an external URI. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-org-confirm-resource-safe-Throw-an-error-when-non-in.patch >From 008c76edc6f79cac3c987ec9ba84674bc89a4f85 Mon Sep 17 00:00:00 2001 Message-ID: <008c76edc6f79cac3c987ec9ba84674bc89a4f85.1717932899.git.yantar92@posteo.net> From: Ihor Radchenko Date: Sun, 9 Jun 2024 13:27:46 +0200 Subject: [PATCH] org--confirm-resource-safe: Throw an error when non-interactive * lisp/org.el (org--confirm-resource-safe): When asking about resource safety in non-interactive mode throw an error rather than silently not downloading the resource. The previous behavior may remote #+include's seemingly being ignored. * etc/ORG-NEWS (Org mode may throw an error when attempting to include remote unsafe resource): Announce the change. --- etc/ORG-NEWS | 8 ++++++++ lisp/org.el | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS index 6265a17fb..5af437497 100644 --- a/etc/ORG-NEWS +++ b/etc/ORG-NEWS @@ -18,6 +18,14 @@ Please send Org bug reports to mailto:emacs-orgmode@gnu.org. # require user action for most Org mode users. # Sorted from most important to least important. +*** Org mode may throw an error when attempting to include remote unsafe resource + +Previously, when ~org-resource-download-policy~ is ~ask~ (default), +and Emacs is running in batch mode, Org mode simply skipped unsafe +remote resources in the =#+include:='s. Now, an error is thrown to +avoid seemingly ignored =#+include= statements when publishing via +batch scripts. + ** New features # We list the most important features, and the features that may diff --git a/lisp/org.el b/lisp/org.el index cf4c9a99e..0f3818504 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -4741,7 +4741,8 @@ (defun org--safe-remote-resource-p (uri) (defun org--confirm-resource-safe (uri) "Ask the user if URI should be considered safe, returning non-nil if so." - (unless noninteractive + (if noninteractive + (error "Cannot prompt about %S interactively in batch mode. Aborting" uri) (let ((current-file (and (buffer-file-name (buffer-base-buffer)) (file-truename (buffer-file-name (buffer-base-buffer))))) (domain (and (string-match -- 2.45.1 --=-=-= Content-Type: text/plain -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at --=-=-=--