IONOS(user_oidc): backport Bearer-scheme guard from upstream #1386 (HDNEXT-2218) - #3
Merged
printminion-co merged 1 commit intoSep 11, 2026
Conversation
…on header's value starts with 'Bearer' Signed-off-by: Julien Veyssier <julien-nc@posteo.net> (cherry picked from commit 2aa104a) Signed-off-by: Misha M.-Kupriyanov <kupriyanov@strato.de>
printminion-co
deleted the
mk/dev/HDNEXT-2218-user-oidc-bearer-guard
branch
September 11, 2026 21:02
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
NC30–NC33 IONOS user_oidc line: vanilla
v8.6.1+ a single backported upstream fix.ionos-stable8.6= vanilla v8.6.1 (b5a67c7).cherry-pick -xof upstream2aa104a
(nextcloud/user_oidc#1386), which landed
after v8.6.1 — the version we must stay on.
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.
Because DAV requests carry no session, Nextcloud re-runs the full auth chain per request
(
apps/dav/lib/Connector/Sabre/Auth.php→OC_User::handleApacheAuth()→Backend::getCurrentUserId()), so 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. Load is spiky rather than smooth — a
single
rcloneclient produced 3,492 of these events in one minute (~29/userinfocalls/secondfrom one host), which alone exceeds the estate-wide hourly average.
Reconciliation against v8.6.1
preg_replace('/^bearer\s+/i', …)line the patch expects)Because this is the unmodified upstream commit, the IONOS delta disappears by itself as soon as we
upgrade to an upstream release that already contains nextcloud#1386.
No configuration change
userinfo_bearer_validationstaystrueand must not be set tofalse: IONOS access tokens carryno
userIdclaim, soSelfEncodedValidatorcannot resolve a uid andUserInfoValidatoris the onlyvalidator that works. Over three hours live, all 9 successful Bearer validations went through
UserInfoValidatorand zero throughSelfEncodedValidator.Scope note
This branch line (
ionos-stable8.6) serves HiDriveNext / nc-server, whose four release branches(
ionos-dev-v30…ionos-dev-v33) all pin the same v8.6.1 commit; v8.6.1 declares NC min 29 /max 34, so one artifact covers all four.
appinfo/info.xmltherefore needs no bump.The
ionos-devbranch (ncw-server, 8.1.0 line) has the same defect but is deliberately nottouched here — it needs its own ticket and its own backport.
Consumed by the
IONOS-Productivity/nc-serverionos-dev-v30…v33submodule bumps after merge +prerelease tag
v8.6.1-<sha7>.Jira: HDNEXT-2218