From a243e9cfbbf99007f2b592196214b7252c1635f1 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Mon, 17 Mar 2025 11:43:24 +0100 Subject: [PATCH] fix(webauthn): do not require bcmath or gmp - not needed anymore The extensions are not required anymore but only recommended for performance. See also: https://github.com/web-auth/webauthn-framework/issues/213 Signed-off-by: Ferdinand Thiessen --- apps/settings/lib/Settings/Personal/Security/WebAuthn.php | 3 +-- apps/settings/lib/SetupChecks/PhpModules.php | 4 +--- lib/private/Authentication/WebAuthn/Manager.php | 8 -------- 3 files changed, 2 insertions(+), 13 deletions(-) diff --git a/apps/settings/lib/Settings/Personal/Security/WebAuthn.php b/apps/settings/lib/Settings/Personal/Security/WebAuthn.php index b0bd16a0dc7..a6ba4e9522a 100644 --- a/apps/settings/lib/Settings/Personal/Security/WebAuthn.php +++ b/apps/settings/lib/Settings/Personal/Security/WebAuthn.php @@ -40,8 +40,7 @@ class WebAuthn implements ISettings { $this->mapper->findAllForUid($this->userId) ); - return new TemplateResponse('settings', 'settings/personal/security/webauthn', [ - ]); + return new TemplateResponse('settings', 'settings/personal/security/webauthn'); } public function getSection(): ?string { diff --git a/apps/settings/lib/SetupChecks/PhpModules.php b/apps/settings/lib/SetupChecks/PhpModules.php index 60c14757301..b0b4f106f4a 100644 --- a/apps/settings/lib/SetupChecks/PhpModules.php +++ b/apps/settings/lib/SetupChecks/PhpModules.php @@ -32,7 +32,6 @@ class PhpModules implements ISetupCheck { 'zlib', ]; protected const RECOMMENDED_MODULES = [ - 'bcmath', 'exif', 'gmp', 'intl', @@ -58,8 +57,7 @@ class PhpModules implements ISetupCheck { return match($module) { 'intl' => $this->l10n->t('increases language translation performance and fixes sorting of non-ASCII characters'), 'sodium' => $this->l10n->t('for Argon2 for password hashing'), - 'bcmath' => $this->l10n->t('for WebAuthn passwordless login'), - 'gmp' => $this->l10n->t('for WebAuthn passwordless login, and SFTP storage'), + 'gmp' => $this->l10n->t('required for SFTP storage and recommended for WebAuthn performance'), 'exif' => $this->l10n->t('for picture rotation in server and metadata extraction in the Photos app'), default => '', }; diff --git a/lib/private/Authentication/WebAuthn/Manager.php b/lib/private/Authentication/WebAuthn/Manager.php index e65002632d8..96dc0719b54 100644 --- a/lib/private/Authentication/WebAuthn/Manager.php +++ b/lib/private/Authentication/WebAuthn/Manager.php @@ -246,14 +246,6 @@ class Manager { } public function isWebAuthnAvailable(): bool { - if (!extension_loaded('bcmath')) { - return false; - } - - if (!extension_loaded('gmp')) { - return false; - } - if (!$this->config->getSystemValueBool('auth.webauthn.enabled', true)) { return false; }