From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id wA6TAjF4TGKNWQEAgWs5BA (envelope-from ) for ; Tue, 05 Apr 2022 19:11:13 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id aHpKADF4TGKiTgAA9RJhRA (envelope-from ) for ; Tue, 05 Apr 2022 19:11:13 +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 5192914A8E for ; Tue, 5 Apr 2022 19:11:12 +0200 (CEST) Received: from localhost ([::1]:57496 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nbmhz-0003Ko-I2 for larch@yhetil.org; Tue, 05 Apr 2022 13:11:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47312) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nbmfu-0002CO-3r for guix-patches@gnu.org; Tue, 05 Apr 2022 13:09:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:33875) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nbmft-0002rX-QO for guix-patches@gnu.org; Tue, 05 Apr 2022 13:09:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nbmft-00018e-L8 for guix-patches@gnu.org; Tue, 05 Apr 2022 13:09:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#54723] [PATCH] Check URI when verifying narinfo validity. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 05 Apr 2022 17:09:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54723 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Guillaume Le Vaillant Cc: 54723@debbugs.gnu.org Received: via spool by 54723-submit@debbugs.gnu.org id=B54723.16491785034287 (code B ref 54723); Tue, 05 Apr 2022 17:09:01 +0000 Received: (at 54723) by debbugs.gnu.org; 5 Apr 2022 17:08:23 +0000 Received: from localhost ([127.0.0.1]:55998 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nbmfH-000175-AC for submit@debbugs.gnu.org; Tue, 05 Apr 2022 13:08:23 -0400 Received: from eggs.gnu.org ([209.51.188.92]:53838) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nbmfF-00016p-Ir for 54723@debbugs.gnu.org; Tue, 05 Apr 2022 13:08:22 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:37216) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nbmf9-0002mc-5E; Tue, 05 Apr 2022 13:08:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=t2NS2OZ58+KlEoG/1BdGM6IJfvIR7qn8D7zeXz4JseI=; b=qwmkDWsY1pV7bOOaM25/ SIjChxACVo6toirC5qWyO0nZZ/ZmY1Afepnz3ZCVnW4+vFr8S+YGO9BSj1GINqa5dqExpz8MuSZNr Z2dnqeU41Y/vmkc9KQUZ7S8RCPX3oPy0jCQoBX+pz5Wc3lmnANqazvq/9Qj8uoY9ItQtP9iV4GOX2 UMM58FbOUMwNXa2U23Eojiz7kKlnJu9UZMpg2Ky1cyzeaU+VFDL7Tage2KASshW3dODcal9vgtxaj +//0Jq3s4NigLQ+o4u9UB6+K07pBj4Gj/U5nZa9WRgZX8pT9ZA16mT3/vg0MHw+2fk7Sxrcmu07UB SOQdSpbF0zcG9Q==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:64792 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nbmf8-0005kD-PP; Tue, 05 Apr 2022 13:08:14 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87a6czbzvh.fsf@kitej> Date: Tue, 05 Apr 2022 19:08:12 +0200 In-Reply-To: <87a6czbzvh.fsf@kitej> (Guillaume Le Vaillant's message of "Tue, 05 Apr 2022 09:58:18 +0000") Message-ID: <877d83lapv.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1649178672; 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: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=t2NS2OZ58+KlEoG/1BdGM6IJfvIR7qn8D7zeXz4JseI=; b=n2Z/TUx6sLCyZYcy4J9XyJNsa08reXHI09K6aPdQOZ5Yj5hKIQiKL3tzZKUttZh48Jzt3m +67i79WCA4MtXyS9ZPEMaDDqGWNpt5nA012aHwWF6+VdX6+ebaIX+I7E1OYdgs5m/f+jlv 0pxKe6BCFuBGU6WNgKh39qMR4gLujDxQqV5jBYOYPBnjgLdOAmrlkTPgiRH8yeEaHJqUIe 87qc+YSCsgjJ1C7eaY2fbxTMfE2hqTu13PfSy6j1GRoCf12ls2ARfOk1/5BO9OyRpAyz+U FuQacb6nTns2GZ1mvvSvgCNke0d7b7ZEZ5C0UZnPwo/Ky7Vrthe/ilQ3iXMRlg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1649178672; a=rsa-sha256; cv=none; b=VImh2zpS6+lqO4F2OpfkStb+NYlWbw/g0UsqbUk3upLOncqhOGFvFLZQ6e7N5Mn7TnmzjC PYsGgTbQr6PjRhLeC2m2nX8x+5z79ubcByS8VquOgsJzrzgnPvNUnm5KyZCTTMHzCd3QMw GWzeBil1JLlYq1tN8V4YwxddBDutMDyXrcGEE+hjLecmZF6mmxq9gD2q4hVvH/4FrZCelH QcC7aFkx0jP1tukaqu2e0SZUKKllV1zFTug6ID4aj4jluhBC1nHDYnMyvgoiNZHagsfhUG HyVfoMK6s/OLeZaUBgp4DdBZPZjEeBCHgqZAjxMcJtwxHz3bP+zdv9AhmFAumQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=qwmkDWsY; dmarc=pass (policy=none) header.from=gnu.org; 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" X-Migadu-Spam-Score: -3.97 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=qwmkDWsY; dmarc=pass (policy=none) header.from=gnu.org; 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" X-Migadu-Queue-Id: 5192914A8E X-Spam-Score: -3.97 X-Migadu-Scanner: scn1.migadu.com X-TUID: NTHu5Th1ceaC Hi, Guillaume Le Vaillant skribis: > When trying to upgrade a machine using a substitute server on the same > LAN, I get this crash a lot: > > # guix system reconfigure --substitute-urls=3D"http://192.168.0.22:8080 h= ttps://ci.guix.gnu.org" /etc/guix/config.scm > substitute: mise =C3=A0 jour des substituts depuis =C2=AB=C2=A0http://192= .168.0.22:8080=C2=A0=C2=BB... 100.0 % [...] > It looks like the 'narinfo-uri' field is an empty list instead of a list > of URIs. Is that supposed to be possible? I don=E2=80=99t think so. Could you grab a narinfo and share it? wget -qO - http://192.168.0.22:8080/HASH.narinfo where HASH is the hash part of a store item. What could happen though is a situation where =E2=80=98guix publish=E2=80= =99 only offers a compression method not supported by the client. In that case, =E2=80=98narinfo-best-uri=E2=80=99 throws a match-error because =E2=80=98ch= oices=E2=80=99 is the empty list. We should fix that. > Does the the attached patch adding a check for the validity of > this field in the 'valid-narinfo?' function make sense? Maybe, but I=E2=80=99d like to make sure we understand the issue. Thanks, Ludo=E2=80=99.