summaryrefslogtreecommitdiff
path: root/classes/pref/prefs.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2014-01-19 00:29:42 +0400
committerAndrew Dolgov <[email protected]>2014-01-19 00:29:42 +0400
commitab85ad89b33b14f30fce17bdfa25877e0d72833e (patch)
tree072c3aa3967ed46fcdbb32198a912402ab8225bb /classes/pref/prefs.php
parent4c63934bacb628789897dc2e599e5aa30e76ccd5 (diff)
otp: use application name in provisioning uri
Diffstat (limited to 'classes/pref/prefs.php')
-rw-r--r--classes/pref/prefs.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/classes/pref/prefs.php b/classes/pref/prefs.php
index 671756f08..3e7d467fa 100644
--- a/classes/pref/prefs.php
+++ b/classes/pref/prefs.php
@@ -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"));
+
}
}