From a71b334c4b9131461545d0325e3b2492380c6f0f Mon Sep 17 00:00:00 2001 From: Clifton Palmer Date: Mon, 3 Apr 2017 23:48:34 +0000 Subject: [PATCH 1/1] Lengthened nonce to 20 chars. Fixed n-length nonce usage. --- public | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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) { -- 2.47.2