From 16d507ef55e07f3ad2f87030ce2162dce32797d3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Tue, 19 Jan 2021 14:25:22 +0100 Subject: [PATCH] Mark multi-factor methods as final There is no good reason why anyone should be allowed to inherit from these classes, especially since all the methods are either public or private (and not protected). --- .../system/user/multifactor/BackupMultifactorMethod.class.php | 2 +- .../system/user/multifactor/EmailMultifactorMethod.class.php | 2 +- .../lib/system/user/multifactor/TotpMultifactorMethod.class.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wcfsetup/install/files/lib/system/user/multifactor/BackupMultifactorMethod.class.php b/wcfsetup/install/files/lib/system/user/multifactor/BackupMultifactorMethod.class.php index 42e89ae8b0..9730b828cf 100644 --- a/wcfsetup/install/files/lib/system/user/multifactor/BackupMultifactorMethod.class.php +++ b/wcfsetup/install/files/lib/system/user/multifactor/BackupMultifactorMethod.class.php @@ -25,7 +25,7 @@ use wcf\system\WCF; * @package WoltLabSuite\System\User\Multifactor * @since 5.4 */ -class BackupMultifactorMethod implements IMultifactorMethod { +final class BackupMultifactorMethod implements IMultifactorMethod { /** * @var IPasswordAlgorithm */ diff --git a/wcfsetup/install/files/lib/system/user/multifactor/EmailMultifactorMethod.class.php b/wcfsetup/install/files/lib/system/user/multifactor/EmailMultifactorMethod.class.php index 9d6c996847..a6a80ed1c5 100644 --- a/wcfsetup/install/files/lib/system/user/multifactor/EmailMultifactorMethod.class.php +++ b/wcfsetup/install/files/lib/system/user/multifactor/EmailMultifactorMethod.class.php @@ -22,7 +22,7 @@ use wcf\system\WCF; * @package WoltLabSuite\System\User\Multifactor * @since 5.4 */ -class EmailMultifactorMethod implements IMultifactorMethod { +final class EmailMultifactorMethod implements IMultifactorMethod { private const LIFETIME = 10 * 60; private const REFRESH_AFTER = 2 * 60; diff --git a/wcfsetup/install/files/lib/system/user/multifactor/TotpMultifactorMethod.class.php b/wcfsetup/install/files/lib/system/user/multifactor/TotpMultifactorMethod.class.php index 43802fb038..e729288142 100644 --- a/wcfsetup/install/files/lib/system/user/multifactor/TotpMultifactorMethod.class.php +++ b/wcfsetup/install/files/lib/system/user/multifactor/TotpMultifactorMethod.class.php @@ -29,7 +29,7 @@ use wcf\system\WCF; * @package WoltLabSuite\System\User\Multifactor * @since 5.4 */ -class TotpMultifactorMethod implements IMultifactorMethod { +final class TotpMultifactorMethod implements IMultifactorMethod { private const USER_ATTEMPTS_PER_TEN_MINUTES = 5; /** -- 2.20.1