Skip to content

Fixes entry condition in matomo proxy#100

Merged
sgiehl merged 1 commit intomasterfrom
fixcondition
Mar 31, 2026
Merged

Fixes entry condition in matomo proxy#100
sgiehl merged 1 commit intomasterfrom
fixcondition

Conversation

@sgiehl
Copy link
Copy Markdown
Member

@sgiehl sgiehl commented Mar 30, 2026

Description

This fixes a whitelist bypass in matomo-proxy.php.

Previously, a request to the opt-out proxy was accepted if either the file parameter matched $VALID_FILES or module.action matched $SUPPORTED_METHODS. Because proxy.php prioritizes file for JS requests, an attacker could send a valid opt-out module.action together with an arbitrary file value and bypass the file whitelist.

The fix makes file take precedence: when a file parameter is present, it must be explicitly whitelisted. If no file is provided, the request must match one of the supported opt-out module.action pairs. Regression tests were added for both GET and POST variants of the mixed-parameter bypass.

Checklist

  • [✔] I have understood, reviewed, and tested all AI outputs before use
  • [✔] All AI instructions respect security, IP, and privacy rules

Review

@sgiehl sgiehl requested a review from a team March 30, 2026 07:45
@sgiehl sgiehl merged commit 07b3a4c into master Mar 31, 2026
8 checks passed
@sgiehl sgiehl deleted the fixcondition branch March 31, 2026 06:04
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