Skip to content

Commit 3514ac0

Browse files
susnuxAndyScherzinger
authored andcommitted
fix(webauthn): do not require bcmath or gmp - not needed anymore
The extensions are not required anymore but only recommended for performance. See also: web-auth/webauthn-framework#213 Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
1 parent 67ee752 commit 3514ac0

File tree

3 files changed

+2
-13
lines changed

3 files changed

+2
-13
lines changed

apps/settings/lib/Settings/Personal/Security/WebAuthn.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@ public function getForm() {
4040
$this->mapper->findAllForUid($this->userId)
4141
);
4242

43-
return new TemplateResponse('settings', 'settings/personal/security/webauthn', [
44-
]);
43+
return new TemplateResponse('settings', 'settings/personal/security/webauthn');
4544
}
4645

4746
public function getSection(): ?string {

apps/settings/lib/SetupChecks/PhpModules.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ class PhpModules implements ISetupCheck {
3232
'zlib',
3333
];
3434
protected const RECOMMENDED_MODULES = [
35-
'bcmath',
3635
'exif',
3736
'gmp',
3837
'intl',
@@ -58,8 +57,7 @@ protected function getRecommendedModuleDescription(string $module): string {
5857
return match($module) {
5958
'intl' => $this->l10n->t('increases language translation performance and fixes sorting of non-ASCII characters'),
6059
'sodium' => $this->l10n->t('for Argon2 for password hashing'),
61-
'bcmath' => $this->l10n->t('for WebAuthn passwordless login'),
62-
'gmp' => $this->l10n->t('for WebAuthn passwordless login, and SFTP storage'),
60+
'gmp' => $this->l10n->t('required for SFTP storage and recommended for WebAuthn performance'),
6361
'exif' => $this->l10n->t('for picture rotation in server and metadata extraction in the Photos app'),
6462
default => '',
6563
};

lib/private/Authentication/WebAuthn/Manager.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -246,14 +246,6 @@ public function deleteRegistration(IUser $user, int $id): void {
246246
}
247247

248248
public function isWebAuthnAvailable(): bool {
249-
if (!extension_loaded('bcmath')) {
250-
return false;
251-
}
252-
253-
if (!extension_loaded('gmp')) {
254-
return false;
255-
}
256-
257249
if (!$this->config->getSystemValueBool('auth.webauthn.enabled', true)) {
258250
return false;
259251
}

0 commit comments

Comments
 (0)