From ff9555d7aed1cb8b79689488425be2b779ef3481 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 24 Aug 2013 20:11:36 +0200 Subject: [PATCH] Fixed Google Chart URL From: http://stackoverflow.com/questions/17071368/400-bad-request-when-attempting-to-insert-qr-code-image-for-google-authenticator --- lib/Google/Authenticator/GoogleAuthenticator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Google/Authenticator/GoogleAuthenticator.php b/lib/Google/Authenticator/GoogleAuthenticator.php index 5041e44..5ba7ee0 100644 --- a/lib/Google/Authenticator/GoogleAuthenticator.php +++ b/lib/Google/Authenticator/GoogleAuthenticator.php @@ -99,7 +99,7 @@ protected static function hashToInt($bytes, $start) */ public function getUrl($user, $hostname, $secret) { - $encoder = "https://www.google.com/chart?chs=200x200&chld=M|0&cht=qr&chl="; + $encoder = "https://chart.googleapis.com/chart?chs=200x200&chld=M|0&cht=qr&chl="; $encoderURL = sprintf("%sotpauth://totp/%s@%s%%3Fsecret%%3D%s", $encoder, $user, $hostname, $secret); return $encoderURL;