From 27262c033787cdccfe85e47fab8a9e6bbe592e65 Mon Sep 17 00:00:00 2001 From: Jacob Bachmeyer Date: Sat, 12 Feb 2022 22:33:22 -0600 Subject: [PATCH] Correctly handle both old and new signature timestamps from GPG --- upload-ftp-v1.2.pl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/upload-ftp-v1.2.pl b/upload-ftp-v1.2.pl index c274991..2f34a86 100755 --- a/upload-ftp-v1.2.pl +++ b/upload-ftp-v1.2.pl @@ -979,6 +979,10 @@ sub read_directive_file { ftp_syslog('debug', "($log_style) DEBUG: Signature made $1") if DEBUG; + # Some versions of GPG also mention the key used to make the signature + # on this line, while others do not. The testing mock does. + $timestr =~ s/ using .*//; # trim to only timestamp + # If the time/date string starts with a weekday (e.g. "Wed Apr 28 16:40:03 2004 EDT"), # chop off the weekday - Date::Manip doesn't like it $timestr =~ s/^[a-z]+? ([a-z]+)/$1/i; -- 2.25.1