From: Clifton Palmer Date: Mon, 3 Apr 2017 23:48:34 +0000 (+0000) Subject: Lengthened nonce to 20 chars. X-Git-Tag: 1.0.0~19 X-Git-Url: http://git.purplebirdman.com/public.git/commitdiff_plain/a71b334c4b9131461545d0325e3b2492380c6f0f?hp=d6bdcd5ebdddfccaf412b260966d791247c52580 Lengthened nonce to 20 chars. Fixed n-length nonce usage. --- diff --git a/public b/public index 8c6f828..0d10631 100755 --- a/public +++ b/public @@ -12,11 +12,11 @@ my $http_uri = 'http://136.63.171.222/public'; sub nonce { my $n = shift; - $n = 10 unless $n; + $n = 10 unless $n > 0; my @chars = ( 'a' .. 'z', 'A' .. 'Z', '0' .. '9' ); my @path = (); - push @path, $chars[ rand @chars ] for 1 .. 10; + push @path, $chars[ rand @chars ] for 1 .. $n; return join '', @path; } @@ -41,7 +41,7 @@ sub addFiles { die "No match: $name\n" unless @files; # create nonce dir and add symbolic links - my $nonce = nonce(); + my $nonce = nonce(20); my $nonce_dir = makeNonceDir($nonce); for my $file (@files) {