From: Nils Gillmann <ng0@n0.is>
To: "Clément Lassieur" <clement@lassieur.org>
Cc: 32111@debbugs.gnu.org
Subject: [bug#32111] [PATCH] daemon: Allow store names to start with a dot.
Date: Tue, 10 Jul 2018 19:18:39 +0000 [thread overview]
Message-ID: <20180710191839.bujbi5ekprczypwv@abyayala> (raw)
In-Reply-To: <20180710124355.12754-1-clement@lassieur.org>
Hi,
Can you provide some context why this is necessary, maybe even
in the commit message?
Clément Lassieur transcribed 883 bytes:
> * nix/libstore/store-api.cc (checkStoreName): Disallow only "." and "..".
> ---
> nix/libstore/store-api.cc | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/nix/libstore/store-api.cc b/nix/libstore/store-api.cc
> index 9e07c67e9..1618f1745 100644
> --- a/nix/libstore/store-api.cc
> +++ b/nix/libstore/store-api.cc
> @@ -58,9 +58,8 @@ string storePathToName(const Path & path)
> void checkStoreName(const string & name)
> {
> string validChars = "+-._?=";
> - /* Disallow names starting with a dot for possible security
> - reasons (e.g., "." and ".."). */
> - if (string(name, 0, 1) == ".")
> + /* Disallow "." and ".." for possible security reasons. */
> + if ((name == ".") || (name == ".."))
> throw Error(format("illegal name: `%1%'") % name);
> foreach (string::const_iterator, i, name)
> if (!((*i >= 'A' && *i <= 'Z') ||
> --
> 2.18.0
>
>
>
>
next prev parent reply other threads:[~2018-07-10 19:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-10 12:43 [bug#32111] [PATCH] daemon: Allow store names to start with a dot Clément Lassieur
2018-07-10 19:18 ` Nils Gillmann [this message]
2018-07-10 19:23 ` Clément Lassieur
2018-07-12 8:41 ` Ludovic Courtès
2018-07-12 13:20 ` bug#32111: daemon store names can't " Clément Lassieur
2018-07-12 16:17 ` [bug#32111] " Ludovic Courtès
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=20180710191839.bujbi5ekprczypwv@abyayala \
--to=ng0@n0.is \
--cc=32111@debbugs.gnu.org \
--cc=clement@lassieur.org \
/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).