[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
251/376: nix-channel --add: Validate URL / channel ID
From: |
Ludovic Courtès |
Subject: |
251/376: nix-channel --add: Validate URL / channel ID |
Date: |
Wed, 28 Jan 2015 22:05:24 +0000 |
civodul pushed a commit to tag 1.8
in repository guix.
commit a8925a510caab12da8ac12ae897ec5ba79b991c1
Author: Eelco Dolstra <address@hidden>
Date: Tue Oct 14 11:28:13 2014 +0200
nix-channel --add: Validate URL / channel ID
Fixes #369.
---
scripts/nix-channel.in | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/scripts/nix-channel.in b/scripts/nix-channel.in
index e45b913..8e07821 100755
--- a/scripts/nix-channel.in
+++ b/scripts/nix-channel.in
@@ -61,6 +61,8 @@ sub writeChannels {
# Adds a channel.
sub addChannel {
my ($url, $name) = @_;
+ die "invalid channel URL ‘$url’" unless $url =~ /^(file|http|https):\/\//;
+ die "invalid channel identifier ‘$name’" unless $name =~
/^[a-zA-Z0-9_][a-zA-Z0-9_\-\.]*$/;
readChannels;
$channels{$name} = $url;
writeChannels;
- 264/376: Temporarily disable darwin builds while hydra's darwin is borked, (continued)
- 264/376: Temporarily disable darwin builds while hydra's darwin is borked, Ludovic Courtès, 2015/01/28
- 291/376: Fix message, Ludovic Courtès, 2015/01/28
- 273/376: Fix more warnings, Ludovic Courtès, 2015/01/28
- 258/376: Fix nix-copy-closure --from, Ludovic Courtès, 2015/01/28
- 260/376: Drop support for pre-c++11 compilers., Ludovic Courtès, 2015/01/28
- 262/376: Revert "Drop support for pre-c++11 compilers.", Ludovic Courtès, 2015/01/28
- 263/376: Fix build on gcc < 4.7, Ludovic Courtès, 2015/01/28
- 244/376: Show total allocations, Ludovic Courtès, 2015/01/28
- 293/376: Remove Hydra build product, Ludovic Courtès, 2015/01/28
- 279/376: Add a launchd configuration file to run nix-daemon, Ludovic Courtès, 2015/01/28
- 251/376: nix-channel --add: Validate URL / channel ID,
Ludovic Courtès <=
- 252/376: Remove redundant space in usage errors, Ludovic Courtès, 2015/01/28
- 290/376: realiseContext: Handle all context types, Ludovic Courtès, 2015/01/28
- 276/376: Improve error message if the daemon worker fails to start, Ludovic Courtès, 2015/01/28
- 267/376: Remove comments claiming we use a private PID namespace, Ludovic Courtès, 2015/01/28
- 237/376: Don't recompile the same regex over and over, Ludovic Courtès, 2015/01/28
- 297/376: Build Ubuntu 14.10 package, Ludovic Courtès, 2015/01/28
- 268/376: Document some primops, Ludovic Courtès, 2015/01/28
- 272/376: Shut up a clang warning, Ludovic Courtès, 2015/01/28
- 257/376: Revert "binary download: Use $NIX_CURL_FLAGS", Ludovic Courtès, 2015/01/28
- 266/376: doc: fixed nix-instantiate --find-file, Ludovic Courtès, 2015/01/28