unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Richard Sent <richard@freakingpenguin.com>
To: Antero Mejr <mail@antr.me>
Cc: 71153@debbugs.gnu.org
Subject: bug#71153: [PATCH] gnu: Validate substitute URLs for guix service.
Date: Fri, 24 May 2024 10:19:32 -0400	[thread overview]
Message-ID: <87cypbuwaz.fsf@freakingpenguin.com> (raw)
In-Reply-To: <87cypcrwe1.fsf@antr.me> (Antero Mejr's message of "Thu, 23 May 2024 22:33:42 +0000")

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	other threads:[~2024-05-24 14:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-23 22:33 bug#71153: [PATCH] gnu: Validate substitute URLs for guix service Antero Mejr
2024-05-24 14:19 ` Richard Sent [this message]
2024-05-24 18:26   ` Antero Mejr

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87cypbuwaz.fsf@freakingpenguin.com \
    --to=richard@freakingpenguin.com \
    --cc=71153@debbugs.gnu.org \
    --cc=mail@antr.me \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).