@@ -93,6 +93,10 @@ sub totp ( $user, $domain ) {
if ( !$secret ) {
# Liquidate the QR code if it's already there
unlink "totp/$qr" if -f "totp/$qr";
+
+ # Generate a new secret
+ $totp->valid_secret();
$secret = $totp->secret();
$dbh->do( "UPDATE user SET totp_secret=? WHERE name=?", undef, $secret, $user ) or return ( undef, undef, 1, "Failed to store TOTP secret." );
}
@@ -6,7 +6,7 @@
<title><: $title | mark_raw :></title>
<meta charset="utf-8" />
- <link rel="alternate" title="rss" type="application/rss+xml" href="<: $route :?format=rss" />
+ <link rel="alternate" title="rss" type="application/rss+xml" href="<: $route :>?format=rss" />
<link rel="icon" type="image/svg+xml" href="<: $theme_dir :>/img/icon/favicon.svg" />
<link rel="apple-touch-icon" type="image/png" sizes="167x167" href="<: $theme_dir :>/img/icon/favicon-167.png" />
<link rel="apple-touch-icon" type="image/png" sizes="180x180" href="<: $theme_dir :>/img/icon/favicon-180.png" />