Include accountname in totp url master
authorTollef Fog Heen <tfheen@err.no>
Sat, 27 Jul 2019 00:35:41 +0000 (02:35 +0200)
committerTollef Fog Heen <tfheen@err.no>
Sat, 27 Jul 2019 00:35:41 +0000 (02:35 +0200)
fetch-totp-seed.cgi

index 98ed798..3bcc447 100644 (file)
@@ -33,7 +33,7 @@ my $seed = encode_base32(pack('H*', $hex_seed));
 close $fh;
 #unlink $filename;
 
-my $totpurl = "otpauth://totp/Debian?secret=$seed&issuer=Debian";
+my $totpurl = "otpauth://totp/Debian:$accountname?secret=$seed&issuer=Debian";
 my $totppng = "data:image/png;base64, " .
        encode_base64(GD::Barcode::QRcode->new($totpurl,
                                               { ModuleSize => 10 })->plot->png);