From: Tollef Fog Heen Date: Sat, 27 Jul 2019 00:16:47 +0000 (+0200) Subject: Pick up account name from file as well X-Git-Url: https://git.adam-barratt.org.uk/?p=mirror%2Fuserdir-ldap-cgi.git;a=commitdiff_plain;h=e502a451f0e50a501a3f0b9531c77016a4588b72 Pick up account name from file as well --- diff --git a/fetch-totp-seed.cgi b/fetch-totp-seed.cgi index 639b7eb..322908a 100644 --- a/fetch-totp-seed.cgi +++ b/fetch-totp-seed.cgi @@ -25,7 +25,9 @@ if ($timestamp + 1800 < time()) { my $filename = $config{totpticketdirectory} . "/" . $random_id; open(my $fh, "<", $filename) or &Util::HTMLError("TOTP seed file not found or permission denied: $! ; $filename"); -my $seed = encode_base32(pack('H*', <$fh>)); +my $hex_seed = <$fh>; +my $accountname = <$fh>; +my $seed = encode_base32(pack('H*', hex_seed)); close $fh; #unlink $filename;