mirror of
				https://github.com/elyby/accounts.git
				synced 2025-05-31 14:11:46 +05:30 
			
		
		
		
	Не экранируем символы html символы в qr коде, т.к. они всё таки не должны быть экранированы
This commit is contained in:
		@@ -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)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user