]> git.wh0rd.org Git - tt-rss.git/commitdiff
otp: use application name in provisioning uri
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Sat, 18 Jan 2014 20:29:42 +0000 (00:29 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Sat, 18 Jan 2014 20:29:42 +0000 (00:29 +0400)
classes/pref/prefs.php

index 671756f08d5afd1055d2f039429c4d11ae362ef0..3e7d467fa44753c2a74bc69f80e22df6d3422b71 100644 (file)
@@ -888,7 +888,9 @@ class Pref_Prefs extends Handler_Protected {
                if (!$otp_enabled) {
                        $secret = $base32->encode(sha1($this->dbh->fetch_result($result, 0, "salt")));
                        $topt = new \OTPHP\TOTP($secret);
-                       print QRcode::png($topt->provisioning_uri($login));
+             print QRcode::png("otpauth://totp/".urlencode($login).
+                               "?secret=$secret&issuer=".urlencode("Tiny Tiny RSS"));
+
                }
        }