From 3af1491b893f5031e4a079cc6152807b70ee31a3 Mon Sep 17 00:00:00 2001 From: Sebastian Schulze Date: Sat, 22 Feb 2020 17:55:11 +0100 Subject: [PATCH] [bin] Shorten drop's returned url to a 12-letter hex --- bin/executable_drop | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100755 => 100644 bin/executable_drop diff --git a/bin/executable_drop b/bin/executable_drop old mode 100755 new mode 100644 index 2df93cd..f6b752b --- a/bin/executable_drop +++ b/bin/executable_drop @@ -7,7 +7,7 @@ require 'securerandom' require 'net/scp' file = Pathname.new(ARGV[0]) -new_name = SecureRandom.uuid + File.extname(file) +new_name = SecureRandom.hex(12) + File.extname(file) abort "Och komm." unless file.exist? and file.readable? url = URI.escape("https://drop.bascht.space/#{new_name}")