summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2012-05-23 23:00:36 +0000
committerNorbert Preining <preining@logic.at>2012-05-23 23:00:36 +0000
commitb311cf9511f08f1a393e21095e362ca8f7e53a05 (patch)
tree545b2332f7878b516ccc90cb115e1c6d1fe39a94 /Master
parent565d29edafbcb1a050786162ff52dc716e416a72 (diff)
only allow absolute paths and urls as new repositories
git-svn-id: svn://tug.org/texlive/trunk@26605 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rwxr-xr-xMaster/texmf/scripts/texlive/tlmgr.pl7
1 files changed, 7 insertions, 0 deletions
diff --git a/Master/texmf/scripts/texlive/tlmgr.pl b/Master/texmf/scripts/texlive/tlmgr.pl
index 30f1a41219e..fdc5badeb47 100755
--- a/Master/texmf/scripts/texlive/tlmgr.pl
+++ b/Master/texmf/scripts/texlive/tlmgr.pl
@@ -72,6 +72,7 @@ BEGIN {
}
use Cwd qw/abs_path/;
+use File::Spec;
use Digest::MD5;
use Pod::Usage;
use Getopt::Long qw(:config no_autoabbrev permute);
@@ -3525,6 +3526,12 @@ sub action_repository {
tlwarn("$prg: no repository given (to add)\n");
return;
}
+ # check if it is either url or absolute path
+ if (($p !~ m!^(http|ftp)://!u) &&
+ !File::Spec->file_name_is_absolute($p)) {
+ tlwarn("$prg: neither http/ftp URL nor absolute path, no action: $p\n");
+ return;
+ }
my $t = shift @ARGV;
$t = $p if (!defined($t));
if (defined($repos{$t})) {