From: Jacob Bachmeyer Date: Sun, 13 Feb 2022 04:33:22 +0000 (-0600) Subject: Correctly handle both old and new signature timestamps from GPG X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=27262c033787cdccfe85e47fab8a9e6bbe592e65;p=gatekeeper.git Correctly handle both old and new signature timestamps from GPG --- 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;