GNU bug report logs - #71153
[PATCH] gnu: Validate substitute URLs for guix service.

Previous Next

Package: guix;

Reported by: Antero Mejr <mail <at> antr.me>

Date: Thu, 23 May 2024 22:35:02 UTC

Severity: normal

Tags: patch

Full log


View this message in rfc822 format

From: Richard Sent <richard <at> freakingpenguin.com>
To: Antero Mejr <mail <at> antr.me>
Cc: 71153 <at> debbugs.gnu.org
Subject: bug#71153: [PATCH] gnu: Validate substitute URLs for guix service.
Date: Fri, 24 May 2024 10:19:32 -0400
Antero Mejr <mail <at> antr.me> writes:

> +(define (validate-substitute-url url-str)
> +  (if (string->uri url-str)
> +      url-str
> +      (error "Not a valid substitute URL: " url-str)))
> +

> +              (substitute-urls
> +               (map validate-substitute-url
> +                    (append (guix-extension-substitute-urls extension)
> +                            (guix-configuration-substitute-urls config))))

Should we instead create a validate-substitute-urls and use that as a
sanitizer for the guix-extension and guix-configuration records? This
would catch errors during record creation instead of service creation,
as well as still perform validation if anything else does or will use
those records in the future.

-- 
Take it easy,
Richard Sent
Making my computer weirder one commit at a time.




This bug report was last modified 1 year and 22 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.