Skip to content

Fix DevicesDetection User-Agent double escaping#23977

Merged
sgiehl merged 1 commit intomatomo-org:5.x-devfrom
letmefixthiscode:fix/devicedetection-ua-escaping
Jan 19, 2026
Merged

Fix DevicesDetection User-Agent double escaping#23977
sgiehl merged 1 commit intomatomo-org:5.x-devfrom
letmefixthiscode:fix/devicedetection-ua-escaping

Conversation

@letmefixthiscode
Copy link
Copy Markdown
Contributor

Description

  • Replace deprecated Common::getRequestVar with Request class
  • Use raw string from request to prevent double escaping in Twig templates

Reproduce:
Go to the "Devices Detection" admin tool (index.php?module=DevicesDetection&action=detection).
Enter a double quote " in the User-Agent field and click the [Update] button.
Result: The output field shows the HTML entity " instead of the literal " character.

Checklist

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

Review

- Replace deprecated Common::getRequestVar with Request class
- Use raw string from request to prevent double escaping in Twig templates

Signed-off-by: letmefixthis <letmefixthis.code@gmail.com>
@sgiehl sgiehl added the Bug For errors / faults / flaws / inconsistencies etc. label Jan 18, 2026
Copy link
Copy Markdown
Member

@sgiehl sgiehl left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution 👍

@sgiehl sgiehl modified the milestone: 5.7.0 Jan 18, 2026
@sgiehl sgiehl merged commit 65b1fb5 into matomo-org:5.x-dev Jan 19, 2026
30 of 34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug For errors / faults / flaws / inconsistencies etc.

Development

Successfully merging this pull request may close these issues.

2 participants