Skip to content

Commit 7b4d36e

Browse files
authored
Merge pull request #30 from magento-cia/cia-2.4.3-develop-bugfixes-05152021
Cia 2.4.3 develop bugfixes 05152021
2 parents 124dc59 + 0d2394b commit 7b4d36e

File tree

4 files changed

+74
-3
lines changed

4 files changed

+74
-3
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<csp_whitelist xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Csp:etc/csp_whitelist.xsd">
9+
<policies>
10+
<policy id="frame-src">
11+
<values>
12+
<value id="google_com" type="host">https://www.google.com/recaptcha/</value>
13+
</values>
14+
</policy>
15+
<policy id="script-src">
16+
<values>
17+
<value id="gstatic_com" type="host">https://www.gstatic.com/recaptcha/</value>
18+
<value id="google_com" type="host">https://www.google.com/recaptcha/</value>
19+
</values>
20+
</policy>
21+
</policies>
22+
</csp_whitelist>
23+
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<csp_whitelist xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Csp:etc/csp_whitelist.xsd">
9+
<policies>
10+
<policy id="frame-src">
11+
<values>
12+
<value id="google_com" type="host">https://www.google.com/recaptcha/</value>
13+
</values>
14+
</policy>
15+
<policy id="script-src">
16+
<values>
17+
<value id="gstatic_com" type="host">https://www.gstatic.com/recaptcha/</value>
18+
<value id="google_com" type="host">https://www.google.com/recaptcha/</value>
19+
</values>
20+
</policy>
21+
</policies>
22+
</csp_whitelist>
23+
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<csp_whitelist xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Csp:etc/csp_whitelist.xsd">
9+
<policies>
10+
<policy id="frame-src">
11+
<values>
12+
<value id="google_com" type="host">https://www.google.com/recaptcha/</value>
13+
</values>
14+
</policy>
15+
<policy id="script-src">
16+
<values>
17+
<value id="gstatic_com" type="host">https://www.gstatic.com/recaptcha/</value>
18+
<value id="google_com" type="host">https://www.google.com/recaptcha/</value>
19+
</values>
20+
</policy>
21+
</policies>
22+
</csp_whitelist>
23+

TwoFactorAuth/Test/Integration/UserConfigManagerTest.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,8 @@ public function testShouldEncryptConfiguration(): void
170170
$encryptor = Bootstrap::getObjectManager()->create(EncryptorInterface::class);
171171

172172
/** @var ResourceConnection $resourceConnection */
173-
$connection = Bootstrap::getObjectManager()->get(ResourceConnection::class)
174-
->getConnection(ResourceConnection::DEFAULT_CONNECTION);
173+
$resourceConnection = Bootstrap::getObjectManager()->get(ResourceConnection::class);
174+
$connection = $resourceConnection->getConnection(ResourceConnection::DEFAULT_CONNECTION);
175175

176176
$configPayload = ['a' => 1, 'b' => 2];
177177

@@ -181,8 +181,10 @@ public function testShouldEncryptConfiguration(): void
181181
$configPayload
182182
);
183183

184+
$tfaUserConfig = $resourceConnection->getTableName('tfa_user_config');
185+
184186
$qry = $connection->select()
185-
->from('tfa_user_config', 'encoded_config')
187+
->from($tfaUserConfig, 'encoded_config')
186188
->where('user_id = ?', (int)$dummyUser->getId());
187189

188190
$res = $connection->fetchOne($qry);

0 commit comments

Comments
 (0)