修复二步验证二维码错误

pull/33/head
HFO4 8 years ago
parent 937dfc77fd
commit 6361d4bd2e

@ -22,7 +22,7 @@ class TwoFactor extends Model{
ob_end_clean();
$this->secretKey = $this->ga->createSecret();
session("two_factor_enable",$this->secretKey);
$qrCode = new QrCode(urldecode($this->ga->getQRCodeGoogleUrl(Option::getValue("siteName"), $this->secretKey)));
$qrCode = new QrCode(urldecode(str_replace("https://chart.googleapis.com/chart?chs=200x200&chld=M|0&cht=qr&chl=","",$this->ga->getQRCodeGoogleUrl(Option::getValue("siteName"), $this->secretKey))));
$qrCode->setSize(165);
$qrCode->setMargin(0);
header('Content-Type: '.$qrCode->getContentType());

1436
composer.lock generated

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save