diff --git a/PHPGangsta/GoogleAuthenticator.php b/PHPGangsta/GoogleAuthenticator.php index bf7d116..85badc3 100644 --- a/PHPGangsta/GoogleAuthenticator.php +++ b/PHPGangsta/GoogleAuthenticator.php @@ -104,7 +104,7 @@ public function getQRCodeGoogleUrl($name, $secret, $title = null, $params = arra $height = !empty($params['height']) && (int) $params['height'] > 0 ? (int) $params['height'] : 200; $level = !empty($params['level']) && array_search($params['level'], array('L', 'M', 'Q', 'H')) !== false ? $params['level'] : 'M'; - $urlencoded = urlencode('otpauth://totp/'.$name.'?secret='.$secret.''); + $urlencoded = urlencode('otpauth://totp/'.(isset($title) ? urlencode($title).':':'').$name.'?secret='.$secret.''); if (isset($title)) { $urlencoded .= urlencode('&issuer='.urlencode($title)); }