mirror of
https://github.com/elyby/accounts.git
synced 2024-11-30 02:32:26 +05:30
Не экранируем символы html символы в qr коде, т.к. они всё таки не должны быть экранированы
This commit is contained in:
parent
ec9da1709b
commit
f75c241c5f
@ -63,7 +63,7 @@ class TwoFactorAuthForm extends ApiForm {
|
||||
$provisioningUri = $this->getTotp()->getProvisioningUri();
|
||||
|
||||
return [
|
||||
'qr' => 'data:image/svg+xml,' . htmlspecialchars(trim($this->drawQrCode($provisioningUri))),
|
||||
'qr' => 'data:image/svg+xml,' . trim($this->drawQrCode($provisioningUri)),
|
||||
'uri' => $provisioningUri,
|
||||
'secret' => $this->account->otp_secret,
|
||||
];
|
||||
|
@ -44,7 +44,7 @@ class TwoFactorAuthFormTest extends TestCase {
|
||||
$this->assertArrayHasKey('secret', $result);
|
||||
$this->assertNotNull($account->otp_secret);
|
||||
$this->assertEquals($account->otp_secret, $result['secret']);
|
||||
$this->assertEquals('data:image/svg+xml,<_/>', $result['qr']);
|
||||
$this->assertEquals('data:image/svg+xml,<_/>', $result['qr']);
|
||||
|
||||
/** @var Account|\PHPUnit_Framework_MockObject_MockObject $account */
|
||||
$account = $this->getMockBuilder(Account::class)
|
||||
|
Loading…
Reference in New Issue
Block a user