From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from atuin.qyliss.net (localhost [IPv6:::1]) by atuin.qyliss.net (Postfix) with ESMTP id 4A67D86A8; Sun, 09 Nov 2025 21:10:43 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id AE7D98693; Sun, 09 Nov 2025 21:10:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on atuin.qyliss.net X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DMARC_MISSING,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=4.0.1 Received: from fout-b1-smtp.messagingengine.com (fout-b1-smtp.messagingengine.com [202.12.124.144]) by atuin.qyliss.net (Postfix) with ESMTPS id 781E88692 for ; Sun, 09 Nov 2025 21:10:38 +0000 (UTC) Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfout.stl.internal (Postfix) with ESMTP id 2A9191D00173; Sun, 9 Nov 2025 16:10:36 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-04.internal (MEProxy); Sun, 09 Nov 2025 16:10:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alyssa.is; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1762722636; x=1762809036; bh=4BfjByHxSg iKV2aGsT5FPoe92UkqDoN/aaES3rMw9Tk=; b=kX4AXqKIsbCA+oe4ynu2uBjFV3 or587yEfQ3eDHWiitMj2I0D5mqQl26TcF/6rwuy2OwM4YsckePHJ2+GyWrxT39fL XjXoqbpAMJJ1wZksGAgLCW5diRmfDKZNhKS+WmeaOrrGgXKTSNGzY94XNN2nA3dI RuQ2nhhadME19BYid+mzxU+QDNu4fSMNLVuSzqDpgKPC4eptIFMCteOMw1EqMu6A sYRrFgZUR79laX1B3XiUHN/65o5HwTEoNWIxCjWxEPaN0461AHwHidVcgreKOCwc Mm+T1y2O4w5hsE21upA8q2WnJrVscXVcPvr56tJBVjF5/I3UABZMYTBann2g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1762722636; x=1762809036; bh=4BfjByHxSgiKV2aGsT5FPoe92UkqDoN/aaE S3rMw9Tk=; b=Nag8AHgYcqMrst7QpjB3/Os2gLdyGQVeQ9YtmBpg89frAhiyy9s iC0wXrNsqu2jitRoUo3tWXhyCgmOWnnAuiEXeGnWl7EUq100dSzoyHNWUhpLlZwx sPMEOkhkYmwPk08I9uOJS5w+wV9w4kGunAQBsoDsIsqqlMvBxsh+8KX3Q3AfxJ+F u7J6OXfoo8QkJZK2Tm+08XKuEFw6cjBvZ6iNaiLdpNmKdDfDldLZiI9FfjTGqICe UZzi6LkirZMXJ0nF7ynWsJLUUobBNE170wPFqOQupj+7/8YQE0dvC/325ggQrcuN g62ZaCQU+PalW0hj2WbPZUlQiMt5jTngEyw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggdduleeigeejucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhephffvvefujghffffkgggtsehgtderredttddtnecuhfhrohhmpeetlhihshhsrgcu tfhoshhsuceohhhisegrlhihshhsrgdrihhsqeenucggtffrrghtthgvrhhnpeeiudffue eilefgtefgtddttdekkeehkefgheekudefveetgeefiefftedvteeuveenucevlhhushht vghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehhihesrghlhihsshgrrd hishdpnhgspghrtghpthhtohepvddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohep uggvmhhiohgsvghnohhurhesghhmrghilhdrtghomhdprhgtphhtthhopeguvghvvghlse hsphgvtghtrhhumhdqohhsrdhorhhg X-ME-Proxy: Feedback-ID: i12284293:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 9 Nov 2025 16:10:35 -0500 (EST) Received: by mbp.qyliss.net (Postfix, from userid 1000) id D8A0569248AC; Sun, 09 Nov 2025 22:10:33 +0100 (CET) From: Alyssa Ross To: Demi Marie Obenour Subject: Re: config.nix validation? In-Reply-To: <28029ec0-5976-4666-aa8b-7932cd82cccb@gmail.com> References: <878qgf4fxi.fsf@alyssa.is> <28029ec0-5976-4666-aa8b-7932cd82cccb@gmail.com> Date: Sun, 09 Nov 2025 22:10:32 +0100 Message-ID: <87qzu63oaf.fsf@alyssa.is> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Message-ID-Hash: IDR3XXG5JDS6ZAYP5UTA7MKUUMKTXJCX X-Message-ID-Hash: IDR3XXG5JDS6ZAYP5UTA7MKUUMKTXJCX X-MailFrom: hi@alyssa.is X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-devel.spectrum-os.org-0; header-match-devel.spectrum-os.org-1; header-match-devel.spectrum-os.org-2; header-match-devel.spectrum-os.org-3; header-match-devel.spectrum-os.org-4; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Spectrum OS Development X-Mailman-Version: 3.3.9 Precedence: list List-Id: Patches and low-level development discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Demi Marie Obenour writes: > On 11/9/25 06:13, Alyssa Ross wrote: >> Demi Marie Obenour writes: >>=20 >>> Should the values from config.nix be validated in any way? They are >>> obviously trusted, but it is very easy for the users to make mistakes >>> that could cause extremely confusing problems. For instance, the >>> update patch doesn't support URLs with a query string or a fragment >>> specifier. In fact, such URLs could get mangled. There are other >>> URLs that tools like curl will accept but which will break the build. >>> >>> Should these be validated with regular expressions before use? >>> That will result in build-time errors that at least somewhat point >>> to the source of the problem, rather than mysterious build-time or >>> runtime misbehavior. >>=20 >> Is there a way we could prevent those URLs getting mangled? > > Only with some additional complexity. The URLs for SHA256SUMS and > SHA256SUMS.gpg are built by string concatenation, which breaks if there > is query string or fragment identifier. Also, certain characters in > URLs will cause globbing in curl. These characters are invalid and > should have been %-encoded. > >> Assuming no, we don't know of anybody currently using the configuration >> mechanism, so I wouldn't spend much time on it personally, but that >> doesn't necessarily mean that you shouldn't. Do it in separate patches >> at least though so it doesn't hold up higher priority stuff. > > The updater requires the configuration mechanism to work. Therefore, > I expect it to be used much more frequently in the future. The only > sensible defaults are those used by Spectrum itself, and the > corresponding URLs and signing keys don't exist yet. > > Should these patches be part of the same patch series or a separate > one? Up to you, as long as they come later in a series than everything more urgent. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQRV/neXydHjZma5XLJbRZGEIw/wogUCaREDSAAKCRBbRZGEIw/w ol8TAP4/aAG3AcIqdrgz92JMP+oZGksnKjQ5D5a79DDfsScZAwD/aTAk6tre8dkw uiQCJulFjGQVHxDXFHVQBoLhQMSXdwA= =q+lk -----END PGP SIGNATURE----- --=-=-=--