From f75c241c5f4eac7d21f5d064ed0b5a605861a90c Mon Sep 17 00:00:00 2001 From: ErickSkrauch Date: Thu, 3 Aug 2017 14:50:48 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9D=D0=B5=20=D1=8D=D0=BA=D1=80=D0=B0=D0=BD?= =?UTF-8?q?=D0=B8=D1=80=D1=83=D0=B5=D0=BC=20=D1=81=D0=B8=D0=BC=D0=B2=D0=BE?= =?UTF-8?q?=D0=BB=D1=8B=20html=20=D1=81=D0=B8=D0=BC=D0=B2=D0=BE=D0=BB?= =?UTF-8?q?=D1=8B=20=D0=B2=20qr=20=D0=BA=D0=BE=D0=B4=D0=B5,=20=D1=82.?= =?UTF-8?q?=D0=BA.=20=D0=BE=D0=BD=D0=B8=20=D0=B2=D1=81=D1=91=20=D1=82?= =?UTF-8?q?=D0=B0=D0=BA=D0=B8=20=D0=BD=D0=B5=20=D0=B4=D0=BE=D0=BB=D0=B6?= =?UTF-8?q?=D0=BD=D1=8B=20=D0=B1=D1=8B=D1=82=D1=8C=20=D1=8D=D0=BA=D1=80?= =?UTF-8?q?=D0=B0=D0=BD=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D0=BD=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/models/profile/TwoFactorAuthForm.php | 2 +- .../api/unit/models/profile/TwoFactorAuthFormTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/models/profile/TwoFactorAuthForm.php b/api/models/profile/TwoFactorAuthForm.php index 1f2b47f..f78b00c 100644 --- a/api/models/profile/TwoFactorAuthForm.php +++ b/api/models/profile/TwoFactorAuthForm.php @@ -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, ]; diff --git a/tests/codeception/api/unit/models/profile/TwoFactorAuthFormTest.php b/tests/codeception/api/unit/models/profile/TwoFactorAuthFormTest.php index 36435f1..6e8837d 100644 --- a/tests/codeception/api/unit/models/profile/TwoFactorAuthFormTest.php +++ b/tests/codeception/api/unit/models/profile/TwoFactorAuthFormTest.php @@ -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)