IONOS(user_oidc): switch to IONOS fork with Bearer-scheme guard (HDNEXT-2218) [v31] - #332
Open
printminion-co wants to merge 1 commit into
Open
IONOS(user_oidc): switch to IONOS fork with Bearer-scheme guard (HDNEXT-2218) [v31]#332printminion-co wants to merge 1 commit into
printminion-co wants to merge 1 commit into
Conversation
…XT-2218) Upstream nextcloud/user_oidc#1386 landed after v8.6.1, the version we stay on. Moves the submodule to the IONOS fork at the same version, carrying that patch as the only delta: getCurrentUserId() now ignores Authorization headers that do not use the Bearer scheme, instead of forwarding "Bearer Basic ..." to the IdP /userinfo endpoint on every DAV request. App version 8.6.1 and NC compatibility (min 29, max 34) are unchanged, and there is no configuration change: userinfo_bearer_validation stays true. Tag: https://github.com/IONOS-Productivity/nc-user_oidc/releases/tag/v8.6.1-d65e3f1 SHA: d65e3f16cb27912cbe4b8669249c6d6e42c4f5cd Signed-off-by: Misha M.-Kupriyanov <kupriyanov@strato.de>
This was referenced Sep 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Switches
apps-external/user_oidcfrom vanillanextcloud/user_oidcto the IONOS forkIONOS-Productivity/nc-user_oidcat the same version (8.6.1), so we can carry one backportedupstream fix. No version change, no configuration change.
Why
Backend::getCurrentUserId()strips aBearerprefix from theAuthorizationheader withoutchecking the header actually uses the Bearer scheme. A WebDAV client authenticating with an app
password sends
Authorization: Basic …; that value passes through unmodified and is forwarded tothe IdP as
Authorization: Bearer Basic …, which the IdP rejects with 400. The request thensucceeds via the app-password backend, so the defect is invisible from the client side.
DAV requests carry no session, so Nextcloud re-runs the full auth chain per request
(
apps/dav/lib/Connector/Sabre/Auth.php→OC_User::handleApacheAuth()→Backend::getCurrentUserId()) — this fires on every PROPFIND, PUT and MKCOL from everynon-browser client.
Measured live 2026-09-09, 08:00–09:00 UTC: 92,617
/userinfocalls/hour estate-wide(~2.2M/day), of which 9 in three hours were legitimate. A single
rcloneclient produced 3,492of these events in one minute (~29
/userinfocalls/second from one host), more than theestate-wide hourly average from one machine.
Upstream fixed this in nextcloud/user_oidc#1386,
which landed after v8.6.1 — the version we must stay on. Hence the fork.
The delta
The fork's
ionos-stable8.6branch is vanilla v8.6.1 plus exactly one commit: an unmodifiedcherry-pick -xof upstream 2aa104a380f597e4f9088b9d46758480b9bd4a5c, four added lines inlib/User/Backend.php. Because it is the unmodified upstream commit, the IONOS delta disappearsby itself once we upgrade to an upstream release that already contains nextcloud#1386.
Fork PR: IONOS-Productivity/nc-user_oidc#3
Tag: https://github.com/IONOS-Productivity/nc-user_oidc/releases/tag/v8.6.1-d65e3f1 (pre-release)
No configuration change
userinfo_bearer_validationstaystrueand must not be flipped tofalse: IONOS access tokenscarry no
userIdclaim, soSelfEncodedValidatorcannot resolve a uid andUserInfoValidatoristhe only validator that works — disabling it would break HiDriveNext login in every market.
Scope
v8.6.1 declares NC min 29 / max 34, and all four release branches pinned the same commit, so a
single fork branch and a single prerelease tag serve
ionos-dev-v30…ionos-dev-v33. Thecompanion PRs move the identical two-line change on the other three branches:
ionos-dev-v30— IONOS(user_oidc): switch to IONOS fork with Bearer-scheme guard (HDNEXT-2218) [v30] #331ionos-dev-v31— IONOS(user_oidc): switch to IONOS fork with Bearer-scheme guard (HDNEXT-2218) [v31] #332 ← this PRionos-dev-v32— IONOS(user_oidc): switch to IONOS fork with Bearer-scheme guard (HDNEXT-2218) [v32] #333ionos-dev-v33— IONOS(user_oidc): switch to IONOS fork with Bearer-scheme guard (HDNEXT-2218) [v33] #334Nothing else in the superproject needed touching:
IONOS/Makefiledrives the build off the genericEXTERNAL_FULL_APPSlist,.github/workflows/sbom-matrix.yamlkeys on the submodule path, andthere is no submodule URL allowlist anywhere. The fork is public, so CI needs no new access grant.
Verify
Post-deploy, per the ticket's AC:
Fetching user info endpointon DAV requests drops to zero,LFv2 login end to end still succeeds with
Token validated with …UserInfoValidator, browser loginunaffected, existing sync clients keep working with no re-link, and the
/userinforate on thepatched shard falls to single digits/hour in Kibana.
Jira: HDNEXT-2218
TODO
ionos-dev-v31rc/web-v31-1— cherry-pick onto the RC branch after merge, the wayHDNEXT-2216 reached it (PR IONOS(dav): fix file overwrite via chunked upload without update permission #330 merged to
ionos-dev-v30, then cherry-picked as 331a2ed)