Skip to content

chore(lib): update the bundled XMF library to 1.3.3 and document proxy_trusted - #267

Merged
mambax7 merged 2 commits into
XOOPS:masterfrom
mambax7:docs/proxy-trusted-config
Oct 14, 2026
Merged

mambax7 merged 2 commits into
XOOPS:masterfrom
mambax7:docs/proxy-trusted-config

Conversation

@mambax7

@mambax7 mambax7 commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Updates the bundled XMF library from 1.3.2 to 1.3.3 (xoops_lib/composer.dist.json, xoops_lib/vendor/xoops/xmf).
  • Documents the new proxy_trusted setting beside proxy_env in xoops_data/configs/xoopsconfig.dist.php.

XMF 1.3.3 (XOOPS/xmf#197) only honours the proxy_env header when REMOTE_ADDR is listed in $xoopsConfig['proxy_trusted'] (addresses or CIDR ranges, array or comma separated). Sites that set proxy_env must add proxy_trusted; until then the peer address is used. The release also brings RFC 7239 Forwarded parsing, a delivery timeout in Xmf\Mail\SendmailRunner, and the Tables, Serializer and TokenReader fixes listed in the XMF changelog.

Changelog entry added under 2.7.4 NOT RELEASED.

Verification

  • vendor/composer/installed.json reports xoops/xmf v1.3.3; Xmf\ProxyCheck::TRUSTED_PROXIES_VARIABLE resolves through the bundled autoloader; the classmap is unchanged.
  • Only the XMF package and Composer metadata changed (composer update xoops/xmf --no-dev -a against composer.dist.json).

Summary by Sourcery

Update the bundled XMF library to 1.3.3 and document trusted proxy configuration for forwarded client addresses.

New Features:

  • Add documented proxy_trusted configuration for safely honoring forwarded client IP headers.

Bug Fixes:

  • Update the bundled XMF library to version 1.3.3, including proxy handling and upstream reliability and security fixes.

Build:

  • Refresh Composer dependency and bundled vendor metadata for XMF 1.3.3.

Documentation:

  • Record the XMF and proxy configuration updates in the unreleased changelog.

Summary by CodeRabbit

  • Bug Fixes
    • Improved trusted-proxy handling, including support for RFC 7239 Forwarded headers and client IP detection.
    • Improved Bearer-token parsing for custom headers and handling of legacy payloads.
    • Updated sendmail delivery timeouts and database table defaults and functional-index handling.
  • Documentation
    • Added guidance for configuring trusted proxies, including supported IP and CIDR formats.

Add a commented-out proxy_trusted entry next to proxy_env describing the
trusted-proxy list that gates use of the proxy_env header. The bundled XMF
does not read it yet; it takes effect once XMF is bumped to a release that
includes XOOPS/xmf#197.
Brings the trusted-proxy gate for proxy_env (the proxy_trusted setting
documented in xoopsconfig.dist.php in the previous commit), RFC 7239
Forwarded parsing, the SendmailRunner delivery timeout, and the Tables,
Serializer and TokenReader fixes from XOOPS/xmf 1.3.3.
Copilot AI balanced review requested due to automatic review settings October 14, 2026 04:14
@sourcery-ai

sourcery-ai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Updates the bundled XMF library from 1.3.2 to 1.3.3 with regenerated Composer metadata, bringing trusted-proxy and RFC 7239 handling, mail timeout and upstream fixes; documents the required proxy_trusted configuration and records the change for the unreleased 2.7.4 cycle.

Sequence diagram for trusted proxy client IP resolution

sequenceDiagram
    participant Client
    participant Proxy
    participant XOOPS
    participant ProxyCheck

    Client->>Proxy: HTTP request
    Proxy->>XOOPS: Request with REMOTE_ADDR and proxy_env header
    XOOPS->>ProxyCheck: getClientIp()
    ProxyCheck->>ProxyCheck: isTrustedProxy(REMOTE_ADDR, proxy_trusted)
    alt direct peer is trusted
        ProxyCheck->>ProxyCheck: parse proxy_env
        ProxyCheck-->>XOOPS: First untrusted client address
    else direct peer is not trusted
        ProxyCheck-->>XOOPS: REMOTE_ADDR
    end
Loading

File-Level Changes

Change Details Files
Upgraded the bundled XMF dependency and synchronized Composer’s pinned package metadata and autoloader records to version 1.3.3.
  • Updated the Composer requirement and lock data for xoops/xmf.
  • Regenerated installed package metadata while preserving the existing classmap.
  • Bundled XMF 1.3.3 source changes, including proxy handling, database migration/table fixes, JWT token reading, serialization, ULID, and mail delivery behavior.
  • Added sendmail delivery-timeout handling and its exception type.
  • Added RFC 7239 Forwarded parsing and trusted-proxy enforcement for proxy-derived client addresses.
htdocs/xoops_lib/composer.dist.json
htdocs/xoops_lib/composer.dist.lock
htdocs/xoops_lib/vendor/composer/installed.json
htdocs/xoops_lib/vendor/composer/installed.php
htdocs/xoops_lib/vendor/xoops/xmf/src/Database/Migrate.php
htdocs/xoops_lib/vendor/xoops/xmf/src/Database/Tables.php
htdocs/xoops_lib/vendor/xoops/xmf/src/FilterInput.php
htdocs/xoops_lib/vendor/xoops/xmf/src/I18n/BlockPosition.php
htdocs/xoops_lib/vendor/xoops/xmf/src/Jwt/TokenReader.php
htdocs/xoops_lib/vendor/xoops/xmf/src/Mail/SendmailException.php
htdocs/xoops_lib/vendor/xoops/xmf/src/Mail/SendmailRunner.php
htdocs/xoops_lib/vendor/xoops/xmf/src/ProxyCheck.php
htdocs/xoops_lib/vendor/xoops/xmf/src/Security/SerializableTrait.php
htdocs/xoops_lib/vendor/xoops/xmf/src/Security/Serializer.php
htdocs/xoops_lib/vendor/xoops/xmf/src/Ulid.php
Documented the trusted-proxy configuration required before proxy headers are honored.
  • Added the commented proxy_trusted example beside proxy_env.
  • Documented array and comma-separated IP/CIDR formats and the behavior when no trusted proxies are configured.
htdocs/xoops_data/configs/xoopsconfig.dist.php
Recorded the dependency update in the unreleased 2.7.4 changelog.
  • Added a changelog entry for the bundled XMF update and proxy_trusted documentation.
docs/changelog.270.txt

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: XOOPS/XoopsCore27/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Essentials
  • Run ID: 90b58135-e4da-4b60-ae7e-d57f0822f6fb
📥 Commits

Reviewing files that changed from the base of the PR and between d52ebd2 and 18761f3.

⛔ Files ignored due to path filters: 14
  • htdocs/xoops_lib/composer.dist.lock is excluded by !**/*.lock, !**/composer.dist.lock
  • htdocs/xoops_lib/vendor/composer/installed.json is excluded by !**/vendor/**
  • htdocs/xoops_lib/vendor/composer/installed.php is excluded by !**/vendor/**
  • htdocs/xoops_lib/vendor/xoops/xmf/src/Database/Migrate.php is excluded by !**/vendor/**
  • htdocs/xoops_lib/vendor/xoops/xmf/src/Database/Tables.php is excluded by !**/vendor/**
  • htdocs/xoops_lib/vendor/xoops/xmf/src/FilterInput.php is excluded by !**/vendor/**
  • htdocs/xoops_lib/vendor/xoops/xmf/src/I18n/BlockPosition.php is excluded by !**/vendor/**
  • htdocs/xoops_lib/vendor/xoops/xmf/src/Jwt/TokenReader.php is excluded by !**/vendor/**
  • htdocs/xoops_lib/vendor/xoops/xmf/src/Mail/SendmailException.php is excluded by !**/vendor/**
  • htdocs/xoops_lib/vendor/xoops/xmf/src/Mail/SendmailRunner.php is excluded by !**/vendor/**
  • htdocs/xoops_lib/vendor/xoops/xmf/src/ProxyCheck.php is excluded by !**/vendor/**
  • htdocs/xoops_lib/vendor/xoops/xmf/src/Security/SerializableTrait.php is excluded by !**/vendor/**
  • htdocs/xoops_lib/vendor/xoops/xmf/src/Security/Serializer.php is excluded by !**/vendor/**
  • htdocs/xoops_lib/vendor/xoops/xmf/src/Ulid.php is excluded by !**/vendor/**
📒 Files selected for processing: 3
  • docs/changelog.270.txt
  • htdocs/xoops_data/configs/xoopsconfig.dist.php
  • htdocs/xoops_lib/composer.dist.json

Included review availability: This review used your included allowance. Your plan provides up to 5 included reviews per hour; 3 remain after this review.

Walkthrough

The Composer template now requires XMF ^1.3.3. The sample configuration documents the commented proxy_trusted option and trusted-proxy rules. The 2.7.4 changelog records the XMF 1.3.3 update and its listed changes.

Changes

XMF 1.3.3 update

Layer / File(s) Summary
XMF dependency and release notes
htdocs/xoops_lib/composer.dist.json, htdocs/xoops_data/configs/xoopsconfig.dist.php, docs/changelog.270.txt
The Composer requirement changes from ^1.3.2 to ^1.3.3. The sample configuration documents proxy_trusted and how it affects proxy_env handling. The 2.7.4 changelog records XMF 1.3.3 and its listed changes.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to 18761

The update adds trusted-proxy handling and documents its configuration; no actionable merge-blocking risk was identified in the reviewed changes.

Pre-merge checks: Passed 5
Passed Passed checks: 5 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes both primary changes: updating the bundled XMF library to 1.3.3 and documenting the proxy_trusted setting.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

🔧 PHPStan (2.2.14)

PHP Fatal error: Uncaught Error: Class "Nette\DI\ServiceCreationException" not found in /.cache/phpstan/phpstan/cache/nette.configurator/Container_d0f87d58a8.php:9129
Stack trace:
#0 phar:///usr/bin/phpstan/vendor/nette/di/src/DI/Container.php(51): Container_d0f87d58a8->getDynamicParameter()
#1 phar:///usr/bin/phpstan/vendor/nette/di/src/DI/Container.php(245): _PHPStan_395468aef\Nette\DI\Container->_PHPStan_395468aef\Nette\DI{closure}()
#2 phar:///usr/bin/phpstan/vendor/nette/di/src/DI/Container.php(50): _PHPStan_395468aef\Nette\DI\Container->preventDeadLock()
#3 [internal function]: _PHPStan_395468aef\Nette\DI\Container->getParameter()
#4 /.cache/phpstan/phpstan/cache/nette.configurator/Container_d0f87d58a8.php(9142): array_map()
#5 phar:///usr/bin/phpstan/src/DependencyInjection/Nette/NetteContainer.php(94): Container_d0f87d58a8->getParameters()
#6 phar:///usr/bin/phpstan/src/DependencyInjection/MemoizingContainer.php(57): PHPStan\DependencyInjection\Nette\NetteContainer->getParame

... [truncated 2699 characters] ...

an\Command\AnalyseCommand->execute()
#11 phar:///usr/bin/phpstan/vendor/symfony/console/Application.php(868): _PHPStan_395468aef\Symfony\Component\Console\Command\Command->run()
#12 phar:///usr/bin/phpstan/vendor/symfony/console/Application.php(261): _PHPStan_395468aef\Symfony\Component\Console\Application->doRunCommand()
#13 phar:///usr/bin/phpstan/vendor/symfony/console/Application.php(157): _PHPStan_395468aef\Symfony\Component\Console\Application->doRun()
#14 phar:///usr/bin/phpstan/bin/phpstan(116): _PHPStan_395468aef\Symfony\Component\Console\Application->run()
#15 phar:///usr/bin/phpstan/bin/phpstan(117): _PHPStan_395468aef{closure}()
#16 /usr/bin/phpstan(7): require('...')
#17 {main}
thrown in /.cache/phpstan/phpstan/cache/nette.configurator/Container_d0f87d58a8.php on line 9129

Comment @coderabbitai help to get the list of available commands.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

@gitar-bot

gitar-bot Bot commented Oct 14, 2026

Copy link
Copy Markdown

Important

You are using the Gitar free plan. Upgrade to unlock code review, CI analysis, auto-apply, custom automations, and more.

Gitar

@codecov

codecov Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 22.54%. Comparing base (bbbc3df) to head (18761f3).
⚠️ Report is 4 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #267   +/-   ##
=========================================
  Coverage     22.54%   22.54%           
  Complexity     8666     8666           
=========================================
  Files           685      685           
  Lines         46316    46316           
=========================================
  Hits          10444    10444           
  Misses        35872    35872           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mambax7
mambax7 merged commit 3b923e3 into XOOPS:master Oct 14, 2026
18 checks passed
@mambax7
mambax7 deleted the docs/proxy-trusted-config branch October 15, 2026 23:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants