-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Description
How to use GitHub
- Please use the 👍 reaction to show that you are interested into the same feature.
- Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
- Subscribe to receive notifications on status change and new comments.
Is your feature request related to a problem? Please describe.
The admin panel prints a warning if bcmath and/or gmp PHP module is not available. Those two modules are (AFAIK) only required for WebAuthn. The generic "urgent" module recommendation text is misleading in this case since it does not imply any performance or compatibility issue to not have them installed, aside of an optional non-security relevant feature being not available.
Describe the solution you'd like
If I followed the isWebAuthnAvailable function correctly, the WebAuthn section is only shown with this two modules installed. I would instead like to have the WebAuthn section always shown and the "missing modules" info shown there in case. So users and admins always see this Nextcloud feature but as well see the info if and why it cannot be used. This is especially useful for shared hostings, so users can inform the hosting provider and ask to have those modules installed to make a certain feature available, instead of saying "the admin panel recommends for some generic reason".
Describe alternatives you've considered
Alternatively the admin panel could print more detailed info what this modules are required for. So admins don't need to either track the reason themselves or follow the recommendation "blindly" if even possible or ignore it without having a good feeling with this (🙂) but know exactly what those modules are for and decide well-founded.
Additional context
Relevant code:
- Admin panel checks:
server/apps/settings/lib/Controller/CheckSetupController.php
Lines 592 to 598 in 987f621
if (!extension_loaded('bcmath')) { $recommendedPHPModules[] = 'bcmath'; } if (!extension_loaded('gmp')) { $recommendedPHPModules[] = 'gmp'; } - WebAuthn check:
server/lib/private/Authentication/WebAuthn/Manager.php
Lines 260 to 274 in 9271d65
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; } return true; } - Settings section:
server/apps/settings/lib/Settings/Personal/Security/WebAuthn.php
Lines 71 to 77 in b219ead
public function getSection(): ?string { if (!$this->manager->isWebAuthnAvailable()) { return null; } return 'security'; }