Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordiosmosis <diosmosis@users.noreply.github.com>2019-05-16 03:12:05 +0300
committerGitHub <noreply@github.com>2019-05-16 03:12:05 +0300
commit05017ba88ec611f63bf223728990351212ff560f (patch)
tree79c20127a6584a1316bb864b329d0cba713add10 /plugins/TwoFactorAuth
parentcecec674a65e4dc2a1aa7c33722a5380be2fd719 (diff)
Require password confirmation before setting/removing superuser access. (#13975)
* Require password confirmation for changing superuser access and fix issue where getSiteAccess is called w/ superuser when toggling superuser access. * apply review feedback * Allow bypassing password confirmation in certain scenarios. * Fixing tests & adding UI test. * Update submodule. * test fixes + remove return; from 2fa tests. * update submodule * Fixing tests * Couple tweaks for screenshot testing. * test fixes * Fix TwoFactorAuthUsersManager test. * More test fixes. * try to disable all transitions * More UI test fixes + disable materialize animations globally in UI tests. * 2fa ui tests now working
Diffstat (limited to 'plugins/TwoFactorAuth')
-rw-r--r--plugins/TwoFactorAuth/tests/Fixtures/TwoFactorFixture.php9
-rw-r--r--plugins/TwoFactorAuth/tests/Integration/TwoFactorAuthTest.php4
-rw-r--r--plugins/TwoFactorAuth/tests/UI/TwoFactorAuthUsersManager_spec.js10
-rw-r--r--plugins/TwoFactorAuth/tests/UI/TwoFactorAuth_spec.js32
-rw-r--r--plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuthUsersManager_edit_with_2fa_reset_confirmed.png4
-rw-r--r--plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuthUsersManager_list.png4
-rw-r--r--plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_logme_not_verified_wrong_code.png4
-rw-r--r--plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_logme_verified.png4
-rw-r--r--plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_show_recovery_codes_step1.png4
-rw-r--r--plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_show_recovery_codes_step2.png4
-rw-r--r--plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_twofa_forced_step1.png4
-rw-r--r--plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_twofa_forced_step4.png4
-rw-r--r--plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_twofa_setup_step1.png4
-rw-r--r--plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_twofa_setup_step2.png4
-rw-r--r--plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_twofa_setup_step3.png4
-rw-r--r--plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_usersettings_twofa_disable_step1.png4
-rw-r--r--plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_usersettings_twofa_disable_step2.png4
-rw-r--r--plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_usersettings_twofa_disable_step3.png4
-rw-r--r--plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_usersettings_twofa_enabled.png4
-rw-r--r--plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_usersettings_twofa_enabled_required.png4
20 files changed, 67 insertions, 52 deletions
diff --git a/plugins/TwoFactorAuth/tests/Fixtures/TwoFactorFixture.php b/plugins/TwoFactorAuth/tests/Fixtures/TwoFactorFixture.php
index 37e2777214..3b71c0eba7 100644
--- a/plugins/TwoFactorAuth/tests/Fixtures/TwoFactorFixture.php
+++ b/plugins/TwoFactorAuth/tests/Fixtures/TwoFactorFixture.php
@@ -12,6 +12,7 @@ use Piwik\Date;
use Piwik\Plugins\TwoFactorAuth\Dao\RecoveryCodeDao;
use Piwik\Plugins\TwoFactorAuth\TwoFactorAuthentication;
use Piwik\Plugins\UsersManager\Model;
+use Piwik\Plugins\UsersManager\UserUpdater;
use Piwik\Tests\Framework\Fixture;
use Piwik\Plugins\UsersManager\API as UsersAPI;
@@ -26,6 +27,7 @@ class TwoFactorFixture extends Fixture
private $userWithout2Fa = 'without2FA';
private $userNo2Fa = 'no2FA';
private $userPassword = '123abcDk3_l3';
+ private $superUserWith2Fa = 'superWith2FA';
const USER_2FA_SECRET = '1111111111111111';
@@ -68,6 +70,11 @@ class TwoFactorFixture extends Fixture
public function setUpUsers()
{
+ \Piwik\Plugins\UsersManager\API::getInstance()->addUser($this->superUserWith2Fa, $this->userPassword,
+ $this->superUserWith2Fa . '@matomo.org');
+ $userUpdater = new UserUpdater();
+ $userUpdater->setSuperUserAccessWithoutCurrentPassword($this->superUserWith2Fa, true);
+
foreach ([$this->userWith2Fa, $this->userWithout2Fa, $this->userWith2FaDisable, $this->userNo2Fa] as $user) {
\Piwik\Plugins\UsersManager\API::getInstance()->addUser($user, $this->userPassword, $user . '@matomo.org');
// we cannot set superuser as logme won't work for super user
@@ -79,7 +86,7 @@ class TwoFactorFixture extends Fixture
}
}
- foreach ([$this->userWith2Fa, $this->userWith2FaDisable] as $user) {
+ foreach ([$this->userWith2Fa, $this->userWith2FaDisable, $this->superUserWith2Fa] as $user) {
$this->dao->insertRecoveryCode($user, '123456');
$this->dao->insertRecoveryCode($user, '234567');
$this->dao->insertRecoveryCode($user, '345678');
diff --git a/plugins/TwoFactorAuth/tests/Integration/TwoFactorAuthTest.php b/plugins/TwoFactorAuth/tests/Integration/TwoFactorAuthTest.php
index 2df336f491..07429e2916 100644
--- a/plugins/TwoFactorAuth/tests/Integration/TwoFactorAuthTest.php
+++ b/plugins/TwoFactorAuth/tests/Integration/TwoFactorAuthTest.php
@@ -15,6 +15,7 @@ use Piwik\Plugins\TwoFactorAuth\Dao\TwoFaSecretRandomGenerator;
use Piwik\Plugins\TwoFactorAuth\SystemSettings;
use Piwik\Plugins\TwoFactorAuth\TwoFactorAuthentication;
use Piwik\Plugins\UsersManager\API;
+use Piwik\Plugins\UsersManager\UserUpdater;
use Piwik\Tests\Framework\TestCase\IntegrationTestCase;
/**
@@ -49,7 +50,8 @@ class TwoFactorAuthTest extends IntegrationTestCase
foreach ([$this->userWith2Fa, $this->userWithout2Fa] as $user) {
API::getInstance()->addUser($user, $this->userPassword, $user . '@matomo.org');
- API::getInstance()->setSuperUserAccess($user, 1);
+ $userUpdater = new UserUpdater();
+ $userUpdater->setSuperUserAccessWithoutCurrentPassword($user, 1);
}
$this->dao = StaticContainer::get(RecoveryCodeDao::class);
diff --git a/plugins/TwoFactorAuth/tests/UI/TwoFactorAuthUsersManager_spec.js b/plugins/TwoFactorAuth/tests/UI/TwoFactorAuthUsersManager_spec.js
index 4e07f7cc97..4d5a405dbd 100644
--- a/plugins/TwoFactorAuth/tests/UI/TwoFactorAuthUsersManager_spec.js
+++ b/plugins/TwoFactorAuth/tests/UI/TwoFactorAuthUsersManager_spec.js
@@ -8,8 +8,6 @@
*/
describe("TwoFactorAuthUsersManager", function () {
- this.timeout(0);
-
this.fixture = "Piwik\\Plugins\\TwoFactorAuth\\tests\\Fixtures\\TwoFactorUsersManagerFixture";
var generalParams = 'idSite=1&period=day&date=2010-01-03',
@@ -37,19 +35,21 @@ describe("TwoFactorAuthUsersManager", function () {
await page.evaluate(function () {
$('.userEditForm .menuUserTwoFa a').click();
});
+ await page.waitFor(250);
+ await page.waitFor('.twofa-reset > p', { visible: true });
expect(await page.screenshotSelector('#content,#notificationContainer')).to.matchImage('edit_with_2fa');
});
it('should ask for confirmation before resetting 2fa', async function () {
await page.click('.userEditForm .twofa-reset .resetTwoFa .btn');
- await page.waitFor(500);
- const modal = await page.$('.modal.open');
+ const modal = await page.waitFor('.modal.open', { visible: true });
+ await page.waitFor(1000); // animation
expect(await modal.screenshot()).to.matchImage('edit_with_2fa_reset_confirm');
});
it('should be possible to confirm the reset', async function () {
await page.click('.twofa-confirm-modal .modal-close:not(.modal-no)');
- await page.waitFor(250); // wait for modal to close
+ await page.waitFor(500); // wait for modal to close
expect(await page.screenshotSelector('#content,#notificationContainer')).to.matchImage('edit_with_2fa_reset_confirmed');
});
diff --git a/plugins/TwoFactorAuth/tests/UI/TwoFactorAuth_spec.js b/plugins/TwoFactorAuth/tests/UI/TwoFactorAuth_spec.js
index 5e216d793d..8b702b230f 100644
--- a/plugins/TwoFactorAuth/tests/UI/TwoFactorAuth_spec.js
+++ b/plugins/TwoFactorAuth/tests/UI/TwoFactorAuth_spec.js
@@ -19,7 +19,7 @@ describe("TwoFactorAuth", function () {
async function selectModalButton(button)
{
- await page.click('.modal.open .modal-footer a:contains('+button+')');
+ await (await page.jQuery('.modal.open .modal-footer a:contains('+button+')')).click();
}
async function loginUser(username, doAuth)
@@ -70,11 +70,13 @@ describe("TwoFactorAuth", function () {
async function confirmPassword()
{
+ await page.waitFor('.confirmPasswordForm');
await page.evaluate(function(){
$('.confirmPasswordForm #login_form_password').val('123abcDk3_l3');
$('.confirmPasswordForm #login_form_submit').click();
});
- await page.waitFor(750);
+ await page.waitForNetworkIdle();
+ await page.waitFor(100);
}
it('a user with 2fa can open the widgetized view by token without needing to verify', async function () {
@@ -86,7 +88,7 @@ describe("TwoFactorAuth", function () {
await loginUser('with2FA', false);
expect(await page.screenshotSelector('.loginSection')).to.matchImage('logme_not_verified');
});
-return;
+
it('when logging in and providing wrong code an error is shown', async function () {
await page.type('.loginTwoFaForm #login_form_authcode', '555555');
await page.evaluate(function(){
@@ -101,14 +103,18 @@ return;
await page.evaluate(function(){
$('.loginTwoFaForm #login_form_submit').click();
});
- await page.waitFor(1500);
- expect(await page.screenshotSelector('#content')).to.matchImage('logme_verified');
+ await page.waitForNetworkIdle();
+ await page.waitFor('.widget');
+ expect(await page.screenshotSelector('.pageWrap')).to.matchImage('logme_verified');
});
it('should show user settings when two-fa enabled', async function () {
await loginUser('with2FA');
await page.goto(userSettings);
- expect(await page.screenshotSelector('.userSettings2FA')).to.matchImage('usersettings_twofa_enabled');
+ await page.waitFor('.userSettings2FA', { visible: true });
+ await page.waitFor(500); // animation
+ const elem = await page.$('.userSettings2FA');
+ expect(await elem.screenshot()).to.matchImage('usersettings_twofa_enabled');
});
it('should be possible to show recovery codes step1 authentication', async function () {
@@ -145,7 +151,9 @@ return;
it('should be possible to disable two factor step 3 verified', async function () {
await confirmPassword();
- expect(await page.screenshotSelector('.userSettings2FA')).to.matchImage('usersettings_twofa_disable_step3');
+ await page.waitFor('.userSettings2FA');
+ const elem = await page.$('.userSettings2FA');
+ expect(await elem.screenshot()).to.matchImage('usersettings_twofa_disable_step3');
});
it('should show setup screen - step 1', async function () {
@@ -157,21 +165,15 @@ return;
});
it('should move to second step in setup - step 2', async function () {
- console.log('start');
await page.evaluate(function(){
$('.setupTwoFactorAuthentication .backupRecoveryCode:first').click();
});
- console.log(0);
await page.waitForNetworkIdle();
- console.log(1);
await page.click('.setupTwoFactorAuthentication .goToStep2');
- console.log(2);
await page.waitForNetworkIdle();
- console.log(3);
await page.evaluate(function () {
$('#qrcode').hide();
});
- console.log(4);
expect(await page.screenshotSelector('#content')).to.matchImage('twofa_setup_step2');
});
@@ -190,6 +192,9 @@ return;
await page.evaluate(function () {
$('.setupConfirmAuthCodeForm .confirmAuthCode').click();
});
+ await page.waitForNetworkIdle();
+ await page.waitFor('.widget', { visible: true });
+ await page.waitForNetworkIdle();
expect(await page.screenshotSelector('#content')).to.matchImage('twofa_setup_step4');
});
@@ -220,6 +225,7 @@ return;
await page.evaluate(function () {
$('.setupConfirmAuthCodeForm .confirmAuthCode').click();
});
+ await page.waitForNetworkIdle();
expect(await page.screenshotSelector('.loginSection,#content,#notificationContainer')).to.matchImage('twofa_forced_step4');
});
diff --git a/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuthUsersManager_edit_with_2fa_reset_confirmed.png b/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuthUsersManager_edit_with_2fa_reset_confirmed.png
index 631b48a8e7..820faa151d 100644
--- a/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuthUsersManager_edit_with_2fa_reset_confirmed.png
+++ b/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuthUsersManager_edit_with_2fa_reset_confirmed.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:e51ce8c2d7cf9e6e81b84e89e83a0f6a453196102265b52da8be1eac7aa13b83
-size 28365
+oid sha256:99b7384aaf0b2a6c63fdda6611b323883bc735ecebd29e6f181f07d16a724fce
+size 30075
diff --git a/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuthUsersManager_list.png b/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuthUsersManager_list.png
index dd1ee87fdd..1a7af9b184 100644
--- a/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuthUsersManager_list.png
+++ b/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuthUsersManager_list.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:7b94002780dbc44e7382858defa946a81fe67239ea2deccfeeb75217de7aa71f
-size 53075
+oid sha256:baac8634397639a2ad11797e1390d5ed467ec1fe11a1c14dbe0033f78e67dbb0
+size 58717
diff --git a/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_logme_not_verified_wrong_code.png b/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_logme_not_verified_wrong_code.png
index 6409ebc3c6..613960079c 100644
--- a/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_logme_not_verified_wrong_code.png
+++ b/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_logme_not_verified_wrong_code.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:69c1dbbf415620f8d133bfd5894d5e698a732f5f82aa3aa90d3a142f14b03c0d
-size 49008
+oid sha256:7b830596d955d1db652a5877e1591e616dd611d9422dad8475271ae175964833
+size 49340
diff --git a/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_logme_verified.png b/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_logme_verified.png
index db5c9c5d34..26f8a16927 100644
--- a/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_logme_verified.png
+++ b/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_logme_verified.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:432d04719b40530913c1c0230d3a36c98a7d04f76977ff5f4795055f3b0d395d
-size 139500
+oid sha256:276d31c54153cd889f9ff5a7095c0ba0311a75f4d15a3579653e3379e4730943
+size 137776
diff --git a/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_show_recovery_codes_step1.png b/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_show_recovery_codes_step1.png
index 5a439faa51..d511b3665a 100644
--- a/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_show_recovery_codes_step1.png
+++ b/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_show_recovery_codes_step1.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:b6d5c8f0591b7c3455ec903881f1f0466b6b63029f2a950d83a7a2f51d304a7a
-size 13390
+oid sha256:bf4e7b2dd1d68df9db0826eb9051f796bf3c25426659a9e84792ae4879835f17
+size 13422
diff --git a/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_show_recovery_codes_step2.png b/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_show_recovery_codes_step2.png
index 1fe16418ca..7a0f177274 100644
--- a/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_show_recovery_codes_step2.png
+++ b/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_show_recovery_codes_step2.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:80a3c4babfdfbf6040181cdf4d7059502d3af8df0c0572a16f17cda3e852dc22
-size 63846
+oid sha256:9c10cc5cb40f56bd3a71513c262d91d99a474ff8f975ea67ad24ee1bb8ead0a9
+size 60823
diff --git a/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_twofa_forced_step1.png b/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_twofa_forced_step1.png
index 40e3aad93f..07e63fa139 100644
--- a/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_twofa_forced_step1.png
+++ b/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_twofa_forced_step1.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:750bbc270525ea990e3a541b7d4ce5e819aefe1a05e937dd538af5d2cec34178
-size 103348
+oid sha256:db93961069bfc3e3fb3f2fb7204921eb835545c2ce7535b068f5502474822591
+size 93376
diff --git a/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_twofa_forced_step4.png b/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_twofa_forced_step4.png
index db5c9c5d34..07e63fa139 100644
--- a/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_twofa_forced_step4.png
+++ b/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_twofa_forced_step4.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:432d04719b40530913c1c0230d3a36c98a7d04f76977ff5f4795055f3b0d395d
-size 139500
+oid sha256:db93961069bfc3e3fb3f2fb7204921eb835545c2ce7535b068f5502474822591
+size 93376
diff --git a/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_twofa_setup_step1.png b/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_twofa_setup_step1.png
index 2b525ac946..bab5330078 100644
--- a/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_twofa_setup_step1.png
+++ b/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_twofa_setup_step1.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:d0bc9e697dff2fd9f91451a033ba778c3742e397c2d6f934a8a6b780fa5f02aa
-size 74454
+oid sha256:66a49cb6fc2e73a20ac31e54911199f3b3c8646bea27c43c66b2597f73c249ed
+size 67812
diff --git a/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_twofa_setup_step2.png b/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_twofa_setup_step2.png
index 474486f7df..239a6747b4 100644
--- a/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_twofa_setup_step2.png
+++ b/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_twofa_setup_step2.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:f5a3d9c0bf5c0cacfbcf1b7062a9741a5f2b3cbe093448dd3ffac81202c84f3b
-size 93330
+oid sha256:7816b91a497e36536fcae8c6a361ea5b1e1ddce8c03361746de5e5e06b947a40
+size 86881
diff --git a/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_twofa_setup_step3.png b/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_twofa_setup_step3.png
index 6960b50d5b..e53a9cbd52 100644
--- a/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_twofa_setup_step3.png
+++ b/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_twofa_setup_step3.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:ea30e34f67d85fad191e90f6d10f63275bd243a7357b020e9875babd1a2e2f47
-size 121508
+oid sha256:428605cbed55a690c110dd4db5c863b352d55a9add141e565398f1e7d728239e
+size 115196
diff --git a/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_usersettings_twofa_disable_step1.png b/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_usersettings_twofa_disable_step1.png
index 95fcf8073c..2fb49cb840 100644
--- a/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_usersettings_twofa_disable_step1.png
+++ b/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_usersettings_twofa_disable_step1.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:035f9173979d5650c2ae6dbca4a19c80601b62c4f984c2be912b03cdf57e304a
-size 21734
+oid sha256:bdd3ba9255f3e954c863fcb73e3437e8e1fcc80aa54279f67a07375d4d2021a7
+size 14250
diff --git a/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_usersettings_twofa_disable_step2.png b/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_usersettings_twofa_disable_step2.png
index a98ade64c8..d511b3665a 100644
--- a/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_usersettings_twofa_disable_step2.png
+++ b/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_usersettings_twofa_disable_step2.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:9dddb94c30224362115ae13ebd5170c96caa80be88b18583f7920e0fd213117a
-size 15127
+oid sha256:bf4e7b2dd1d68df9db0826eb9051f796bf3c25426659a9e84792ae4879835f17
+size 13422
diff --git a/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_usersettings_twofa_disable_step3.png b/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_usersettings_twofa_disable_step3.png
index 0418149865..b3b8979820 100644
--- a/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_usersettings_twofa_disable_step3.png
+++ b/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_usersettings_twofa_disable_step3.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:8af9fbcce1498486fd7f42bf18bed791db6dc49e9fb5e9f94f21ea31ab105383
-size 45375
+oid sha256:d81de0a72d903346c4525603144ba753c40a76c3beb90031978226dc6f9fdd06
+size 43691
diff --git a/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_usersettings_twofa_enabled.png b/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_usersettings_twofa_enabled.png
index 8d7197e95b..98a68ce59f 100644
--- a/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_usersettings_twofa_enabled.png
+++ b/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_usersettings_twofa_enabled.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:d11dc17a3b0d891e8dbee1734ec31ff22230d71aa0bedab23f4389e0bb8e8e1e
-size 46583
+oid sha256:34c0c73879e1a8ba3a300ba70f7dcf3b07f4713e6a411e8ca3217f38d24eb3eb
+size 46631
diff --git a/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_usersettings_twofa_enabled_required.png b/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_usersettings_twofa_enabled_required.png
index 2639572760..b7f9641396 100644
--- a/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_usersettings_twofa_enabled_required.png
+++ b/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_usersettings_twofa_enabled_required.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:9d6bba78762b389d8902269840b1bb590918c7bbfe17ec62f452e19411a268fc
-size 52910
+oid sha256:1c6bc6770a97cd4b571f1fae0a2d21a2c43d01c302eb8f4e3d5fc170b40a9b50
+size 51621