about summary refs log tree commit diff
path: root/scripts/download-using-manifests.pl.in
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2012-07-30T21·09-0400
committerEelco Dolstra <eelco.dolstra@logicblox.com>2012-07-30T21·09-0400
commit9cd63d224468af87baf74228acc162873c649493 (patch)
tree48c45348ac0f05d0d689f068da21a61afeba6f70 /scripts/download-using-manifests.pl.in
parentf3eb29c6530e990b18e9f04390f6fa7bfbc58078 (diff)
Do some validation of URLs
Diffstat (limited to 'scripts/download-using-manifests.pl.in')
-rwxr-xr-xscripts/download-using-manifests.pl.in3
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/download-using-manifests.pl.in b/scripts/download-using-manifests.pl.in
index 04bcce90da38..24f7c98e0cb9 100755
--- a/scripts/download-using-manifests.pl.in
+++ b/scripts/download-using-manifests.pl.in
@@ -4,6 +4,7 @@ use strict;
 use Nix::Config;
 use Nix::Manifest;
 use Nix::Store;
+use Nix::Utils;
 use POSIX qw(strftime);
 use File::Temp qw(tempdir);
 
@@ -306,6 +307,7 @@ while (scalar @path > 0) {
         # Download the patch.
         print STDERR "  downloading patch...\n";
         my $patchPath = "$tmpDir/patch";
+        Nix::Utils::checkURL $patch->{url};
         system("$curl '$patch->{url}' -o $patchPath") == 0
             or die "cannot download patch `$patch->{url}'\n";
 
@@ -336,6 +338,7 @@ while (scalar @path > 0) {
         my $size = $narFile->{size} || -1;
         print LOGFILE "$$ narfile $narFile->{url} $size $v\n";
 
+        Nix::Utils::checkURL $narFile->{url};
         if ($curStep < $maxStep) {
             # The archive will be used a base to a patch.
             system("$curl '$narFile->{url}' | $Nix::Config::bzip2 -d > $tmpNar") == 0