Pending

User tests: Successful: Unsuccessful:

avatar Shubham-Padkonde
Shubham-Padkonde
26 Sep 2026

No separate issue is linked.

  • I read the Generative AI policy and my contribution is either not created with the help of AI or is compatible with the policy and GNU/GPL 2 or later.

Summary of Changes

For URL fields allowing relative URLs, detect the current site's hostname followed by a valid boundary rather than comparing the whole input with the hostname. Prepend the protocol for host-plus-path/port/query inputs while retaining normal relative-path handling. Escape the hostname before matching and reject lookalike hostname prefixes.

Testing Instructions

Run php ./libraries/vendor/bin/phpunit --configuration phpunit.xml.dist --filter UrlFilterTest in a configured Joomla development checkout. The fixture uses host www.example.com and root /joomla. Check hostname-only, path, port, query, uppercase host, lookalike host, relative path, absolute path, and full URL cases. These are reproduction instructions, not a claim of a local test run in this update.

Actual result BEFORE applying this Pull Request

www.example.com/blog/post is treated as a relative path and prefixed with /joomla/.

Expected result AFTER applying this Pull Request

The result is http://www.example.com/blog/post. A different host such as www.example.com.evil.org/page remains a relative input; ordinary relative and full URLs keep their existing handling.

Link to documentations

  • 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

These changes restore preservation of existing URL components rather than introduce a new public API.

avatar Shubham-Padkonde Shubham-Padkonde - open - 26 Sep 2026
avatar Shubham-Padkonde Shubham-Padkonde - change - 26 Sep 2026
Status New ⇒ Pending
avatar joomla-cms-bot joomla-cms-bot - change - 26 Sep 2026
Category ⇒ Libraries Unit Tests
avatar brianteeman
brianteeman - comment - 26 Sep 2026

You were given a template to complete for a reason not for fun. Please complete it

avatar Shubham-Padkonde Shubham-Padkonde - change - 27 Sep 2026
Title
…
Prepend the protocol to relative URL field values that start with the…
[AI] Recognize current-host URL prefixes in relative URL fields
avatar Shubham-Padkonde Shubham-Padkonde - edited - 27 Sep 2026
avatar muhme
muhme - comment - 9 Oct 2026

@Shubham-Padkonde Did you read the Generative AI policy? You will then need to confirm (by tick) that your contribution is compatible with the policy and GNU/GPL 2 or later.

avatar Shubham-Padkonde Shubham-Padkonde - change - 16 Oct 2026
The description was changed
avatar Shubham-Padkonde Shubham-Padkonde - edited - 16 Oct 2026

Add a Comment

Login with GitHub to post a comment