Repository navigation
fix(middleware): do not build the XFF middleware without trusted proxies - #3937
Merged
Merged
Conversation
Starting with chi v5.4.0, ClientIPFromXFF panics when no trusted prefix is given, so ClientIP would crash the proxy and collaboration services at startup when no trusted proxies are configured. Without trusted proxies every request uses the network address anyway, so return ClientIPFromRemoteAddr. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Jörn Friedrich Dreyer <[email protected]>
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
🟢 Coverage 100.00% diff coverage · +0.01% coverage variation
Metric Results Coverage variation ✅ +0.01% coverage variation (-1.00%) Diff coverage ✅ 100.00% diff coverage Coverage variation details
Coverable lines Covered lines Coverage Common ancestor commit (a7970e7) 93579 26829 28.67% Head commit (73bfeb0) 93584 (+5) 26844 (+15) 28.68% (+0.01%) Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch:
<coverage of head commit> - <coverage of common ancestor commit>Diff coverage details
Coverable lines Covered lines Diff coverage Pull request (#3937) 5 5 100.00% Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified:
<covered lines added or modified>/<coverable lines added or modified> * 100%
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
micbar
approved these changes
Nov 10, 2026
Merged
butonic
added a commit
that referenced
this pull request
Nov 11, 2026
Brings in opencloud-eu/reva#986: storage drivers return typed results from write operations and the events middleware reads the space owner, deleted ids and final space members from those instead of a context channel and response opaques. Setting a new space image now also deletes the old one. chi, validator, go-jose, go-urn and locales are bumped to the minimum versions reva main requires. The chi v5.4.0 ClientIP panic is already fixed on main by #3937 Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Jörn Friedrich Dreyer <[email protected]>
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.
Starting with chi v5.4.0,
ClientIPFromXFFpanics when it gets no trusted prefix.ClientIPalways built it, so once chi is bumped, the proxy and collaboration services crash at startup when no trusted proxies are configured.TestClientIPWithoutTrustedProxiescatches it.Without trusted proxies every request already took the network address path, so
ClientIPnow returnsClientIPFromRemoteAddrin that case and skips the header middlewares entirely.reva main already requires chi v5.4.0, so this has to land before the next reva bump. It showed up in #3934.
Assisted by Claude Code (claude-opus-5-5): it traced the unit test failure to the chi bump, wrote the change and this description.