bug-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#71153: [PATCH] gnu: Validate substitute URLs for guix service.


From: Richard Sent
Subject: bug#71153: [PATCH] gnu: Validate substitute URLs for guix service.
Date: Fri, 24 May 2024 10:19:32 -0400
User-agent: Gnus/5.13 (Gnus v5.13)

Antero Mejr <mail@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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]