From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.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 EETxGeXEN2SGMQEASxT56A (envelope-from ) for ; Thu, 13 Apr 2023 11:01:25 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id 2PIMGeXEN2RUFQAAG6o9tA (envelope-from ) for ; Thu, 13 Apr 2023 11:01:25 +0200 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 318D222DB1 for ; Thu, 13 Apr 2023 11:01:25 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pmspF-0001Jw-Ds; Thu, 13 Apr 2023 05:01:05 -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 1pmspD-0001Fw-7I for guix-patches@gnu.org; Thu, 13 Apr 2023 05:01:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pmspC-0001uO-SZ for guix-patches@gnu.org; Thu, 13 Apr 2023 05:01:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pmspC-0007Oz-2Z for guix-patches@gnu.org; Thu, 13 Apr 2023 05:01:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#62642] [PATCH] services: certbot: Fix nginx crash when certbot is used without domains Resent-From: Saku Laesvuori Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 13 Apr 2023 09:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62642 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Bruno Victal Cc: 62642@debbugs.gnu.org Received: via spool by 62642-submit@debbugs.gnu.org id=B62642.168137646028439 (code B ref 62642); Thu, 13 Apr 2023 09:01:02 +0000 Received: (at 62642) by debbugs.gnu.org; 13 Apr 2023 09:01:00 +0000 Received: from localhost ([127.0.0.1]:42520 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pmsp9-0007Od-UA for submit@debbugs.gnu.org; Thu, 13 Apr 2023 05:01:00 -0400 Received: from vmi571514.contaboserver.net ([75.119.130.101]:47988 helo=mail.laesvuori.fi) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pmsp5-0007OR-LR for 62642@debbugs.gnu.org; Thu, 13 Apr 2023 05:00:58 -0400 Received: from X-kone (88-113-24-127.elisa-laajakaista.fi [88.113.24.127]) by mail.laesvuori.fi (Postfix) with ESMTPSA id 696973400C6; Thu, 13 Apr 2023 11:01:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=laesvuori.fi; s=mail; t=1681376487; bh=GmkgoiaBazDMEsX92xwKuXa4v3SwQlVOYkO5Rk3OZKk=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=QnAnxWyQR0DrvQ4ahHm/Ll0PKCBKBDt1EB9oHy6t+aswS5H4kobD/QUz0o+mwQbHs 7ufjRYY8HeccEUc90uKS9/izDoEnjVvS+Hrnf/UBey53VmAjHyp2/WrWhsovrb/0kl 4pF6qLXcL/bkYkb5GDOHNyBEuEtd6aNAbdXiuuhI= Date: Thu, 13 Apr 2023 12:00:51 +0300 Message-ID: <20230413090051.p66zgoyvne6gbq7x@X-kone> References: <20230403133241.14760-1-saku@laesvuori.fi> <66755b58-1cb1-eae6-a4ac-69c174ed58aa@makinata.eu> <20230403180659.zhbtbfnn2uhgplgc@X-kone> <84bb2e1c-db0c-ac08-9275-ffcc0f828b1c@makinata.eu> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="bt4ysa3v2gib4t4q" Content-Disposition: inline In-Reply-To: <84bb2e1c-db0c-ac08-9275-ffcc0f828b1c@makinata.eu> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Saku Laesvuori X-ACL-Warn: , Saku Laesvuori via Guix-patches From: Saku Laesvuori via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Seal: i=1; s=key1; d=yhetil.org; t=1681376485; a=rsa-sha256; cv=none; b=YsL9ipZMskF6X8brHPpNHANJmH8UdCwb5+afPorgq/SkZIYNznOIUzlvpYuE2x+4hBeVXA lXaDfjSxCHbXcCLpZl0ieGtYiNrPEUX4e7F+6ap0tb2yKG9Ti9oUm9NO76xEDowvzia/7z I8H2EJ+y8H2koEWc2vuIb7shYuxQV4UjhpG2d2AgicOnaL3VPy0pRRbjA/vu/lQuPMhfJT W4ovgqrcR6JxxvSUdfOcf1sExUQs6utF++6yYdwy9LKkZZ7t/boKfeWMDSCVfyJYPODZ/y fF855xIw+9A2f3e8I7ilH6hnZinaKgqhfGqgabHcKXV2e0t+pfY+Wlf5YpZveQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=laesvuori.fi header.s=mail header.b=QnAnxWyQ; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1681376485; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=GmkgoiaBazDMEsX92xwKuXa4v3SwQlVOYkO5Rk3OZKk=; b=I8WJxvMO9xMk3e9X9VogmSXjEvFfqzgY9nHeNGSa1NyxBdGv6Hhddfxiv5EEr9kL1LNAi/ CUS86O9I5wwjyN6jzMFVGh9gTIkin3D20VTj8SiFZGqp+cP4ej37Phq1+765o+UQAy2Poz ezDlZ91n7uPYqe779O6Xwt5VuELRLWdVnx1eSrWtS0oGRUt7dSF+tCnKOMYUcCb+YwxUzN 2V5WdAIUl1LWnT8fVwSP0JOO9VSrPN00gMmIIfXi7vG5XWuW6bwjPZWnydkO5rtSH6EjSY LeFQ1EtWrxTCEU86UUyIBYmqjX0yxULuTHoAgRSpYBtftH0ucIXq0RmnwGxDdA== X-Migadu-Queue-Id: 318D222DB1 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=laesvuori.fi header.s=mail header.b=QnAnxWyQ; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -6.92 X-Spam-Score: -6.92 X-TUID: 2vfDZuQMEV7V --bt4ysa3v2gib4t4q Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable > IMO, certbot should be extending the nginx service only when the 'challen= ge' field > is #f (ideally this should be made into a =E2=80=9Cenumerated=E2=80=9D ty= pe, where the values range from > 'http-01, 'dns-01, 'custom (as an escape hatch), ...) >=20 > Perhaps you could partition 'certificates' by whether 'challenge' is #f o= r not and use the > results to craft the nginx extension value instead? Certbot extends nginx for two reasons: 1. serving the challenge files 2. enforcing HTTPS by redirecting requests to domains with a certificate The v2 patch adds a separate nginx server block for each certificate and only servers challenge files if 'challenge' is #f. This also causes an empty list of certificates to return an empty list of nginx server blocks and thus fixes the original issue. - Saku Laesvuori --bt4ysa3v2gib4t4q Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEoMkZR3NPB29fCOn/JX0oSiodOjIFAmQ3xMMACgkQJX0oSiod OjKbQxAAlgHHJphHq6/Gp/ETvcHWwTE4pGYsuzIXhQErXW4lnTLya3grnJ53rNtk Z+rlXUVuolYAO3CRVVxNE+mnLDKh9TCx6PTOHyruZffIurE0WjPhPMtf6Rf58erV 7fjc9ddqSbG0YLNgJxiMg4Rwg+F4TblHpUZ3Va4tmcnBAubgBc+aE8fg92kg16ym RpbsA9iAMy2agoX+8CHfGMehiX0v3DmyXvmkDHDUAEWPT445Ubq4aT1pl6k6QrrG sdpBOLrHWAzwNbfwB6e6rmmZsI1GTIm2PAMwHiE+ihBWtTXI9qDguXF1g2Fnelvw ubfCQVbScMA55DELNw+u8WzjYkMAc1wYiVUdAtokbqG8HyfhSlkdxS7vpRlBPntz dI8rYEqRV82beKnW9yvN3hNdAweVjhtRIALfgxhQQ/JbjxuQ7qjO0tzak0BafWrs A/79cD/Bcta3+er9s9UsT+TbVGdxJsWr5rhT5VDoL8plhTs3ni8B5XOQsD8xkJKs o5TxZhqqotcLmmZm0DaigJNv3Mar7VLuY38SjuPHHPwONo6DeLHQPRpzLaccKydi 8auo+Gze1TPk2k4i5pxNFQ9RD1oPX70aglPw5rBxcI0UVtCEnBioNxNJMqfPgat+ /iTysvd4Su4Gn4dLtZtsuyrqgWy+j0WKB4u3X3bnEpFJNrwa2jM= =IdFw -----END PGP SIGNATURE----- --bt4ysa3v2gib4t4q--