Skip to content

fix(whitelist): Recognise every two-factor provider app for guests - #1672

Open
solracsf wants to merge 1 commit into
mainfrom
fix/whitelist-all-twofactor-provider-apps
Open

fix(whitelist): Recognise every two-factor provider app for guests#1672
solracsf wants to merge 1 commit into
mainfrom
fix/whitelist-all-twofactor-provider-apps

Conversation

@solracsf

Copy link
Copy Markdown
Member

Fix #1628

WHITELIST_ALWAYS hardcoded four twofactor apps, so a guest hitting any other provider got a 403 and could not finish the setup or the challenge. On an instance with enforced two-factor authentication that locks the guest out until an admin figures out that the provider app has to be whitelisted by hand.

Instead of growing that list by hand, an app that declares two-factor-providers in its info.xml is now allowed at runtime. That covers twofactor_admin, twofactor_email, twofactor_oath, twofactor_u2f and twofactor_webeid, plus any provider app that ships later.

Providers can also be registered from the app bootstrap, and that list is only reachable through private API, so those apps still have to be named. twofactor_gateway is added for that reason. The four that were already listed stay listed too: the runtime lookup only helps while info.xml is readable and while the app keeps declaring its provider there, and losing either would lock guests out again, which is the bug this fixes.

The lookup is gated on the app being enabled. That matches what ProviderLoader does, and it also keeps guessed app ids from resolving an app path on disk on every request.

@solracsf
solracsf requested a review from CarlSchwan August 21, 2026 12:28
@solracsf solracsf added the 3. to review Waiting for reviews label Aug 21, 2026
Comment thread lib/AppWhitelist.php Outdated
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
@solracsf
solracsf force-pushed the fix/whitelist-all-twofactor-provider-apps branch from 0d7093d to d4d6d66 Compare August 21, 2026 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Whitelist all two-factor provider apps for guests, not just four of them

2 participants