RTC PR-6.2-dev Pending

User tests: Successful: Unsuccessful:

avatar SniperSister
SniperSister
21 Apr 2026

Summary of Changes

This PR removes a completely pointless pseudo security-check in the TemplateHelper.

The code was supposed to check the last 256 chars of an uploaded file for HTML tags - which should removed for various reasons:

  • the code does not work. It's using -1 as offset and will always only return the very last char - and that never matches with the tag blocklist
  • HTML tags are valid content for files in the template manager, because it manages the template overrides
  • the template manager allows adding/editing PHP code, it's "remote code execution" by design - don't worry about <table> tags folks, if someone has access to your PHP files, you are screwed anyways

Why removing it now: AI agents start checking our codebase, that snippet here will very likely cause reports about the wrong offset in file_get_contents.

Testing Instructions

Code review

Actual result BEFORE applying this Pull Request

Code present

Expected result AFTER applying this Pull Request

Code gone

Link to documentations

Please select:

  • Documentation link for guide.joomla.org:

  • No documentation changes for guide.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

avatar SniperSister SniperSister - open - 21 Apr 2026
avatar SniperSister SniperSister - change - 21 Apr 2026
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 21 Apr 2026
Category Administration com_templates
avatar LadySolveig LadySolveig - test_item - 6 May 2026 - Tested successfully
avatar LadySolveig
LadySolveig - comment - 6 May 2026

I have tested this item ✅ successfully on accde23


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47639.

avatar LadySolveig
LadySolveig - comment - 6 May 2026

I have tested this item ✅ successfully on accde23


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47639.

avatar richard67 richard67 - test_item - 6 May 2026 - Tested successfully
avatar richard67
richard67 - comment - 6 May 2026

I have tested this item ✅ successfully on accde23

Code review. The removed code is indeed pretty useless and reads only the last character.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47639.

avatar richard67
richard67 - comment - 6 May 2026

I have tested this item ✅ successfully on accde23

Code review. The removed code is indeed pretty useless and reads only the last character.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47639.

avatar richard67 richard67 - change - 6 May 2026
Status Pending Ready to Commit
Labels Added: PR-6.1-dev
avatar richard67
richard67 - comment - 6 May 2026

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47639.

avatar richard67
richard67 - comment - 6 May 2026

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47639.

avatar richard67
richard67 - comment - 6 May 2026

What seems a bit strange to me is that this pr is for the 6.1-dev branch.

If there is some reason not to do it in a patch version, it should go into 6.2-dev.

But if it can be done with a patch version, it can also be done in 5.4-dev (and merged up into 6.1-dev). For me that would be ok.

@muhme @HLeithner @tecpromotion What do you think?

avatar HLeithner
HLeithner - comment - 6 May 2026

actually that should go into 6.2

avatar HLeithner HLeithner - change - 7 May 2026
Title
[6.1] remove useless pseudo-xss check code in com_templates
[6.2] remove useless pseudo-xss check code in com_templates
avatar HLeithner HLeithner - edited - 7 May 2026
avatar HLeithner HLeithner - change - 7 May 2026
Labels Added: RTC PR-6.2-dev
Removed: PR-6.1-dev

Add a Comment

Login with GitHub to post a comment