PR-6.0-dev Pending

User tests: Successful: Unsuccessful:

avatar hiteshm0
hiteshm0
7 Apr 2026

Pull Request resolves #47515

  • 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

This pull request implements error handling for punycode conversions of URLs by catching exceptions to prevent crash.

In UrlFilter.php, a try...catch block has been added around PunycodeHelper::urlToPunycode() to silently handle conversion exceptions
In UrlRule.php, the host validation logic has been updated to split the hostname into individual labels and test the punycode conversion for each using PunycodeHelper::toPunycode(). Any exception thrown during this process is caught, properly resulting in a validation failure, instead of a unhandled application crash.

Minor code style formatting for the $scheme array in UrlRule.php

Testing Instructions

Try saving a url type form field <input type="url" inputmode="url"> (ex: the "Website" field in the Edit Contact form).
Enter a URL with an invalid hostname character (like an apostrophe), for example:
https://example'test.com

Actual result BEFORE applying this Pull Request

Fatal error / application crash ( ex: 101 Prohibited input U+00000027)

Expected result AFTER applying this Pull Request

No crash. Appropriate error message is shown ( Invalid field: Website)

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 hiteshm0 hiteshm0 - open - 7 Apr 2026
avatar hiteshm0 hiteshm0 - change - 7 Apr 2026
Status New Pending
avatar hiteshm0 hiteshm0 - change - 7 Apr 2026
The description was changed
avatar hiteshm0 hiteshm0 - edited - 7 Apr 2026
avatar joomla-cms-bot joomla-cms-bot - change - 7 Apr 2026
Category Libraries
avatar hiteshm0 hiteshm0 - change - 7 Apr 2026
The description was changed
avatar hiteshm0 hiteshm0 - edited - 7 Apr 2026
avatar BeginnerJoomlaCom BeginnerJoomlaCom - test_item - 8 Apr 2026 - Tested successfully
avatar BeginnerJoomlaCom
BeginnerJoomlaCom - comment - 8 Apr 2026

I have tested this item ✅ successfully on 446c631

Test by using the custom update server.

Thanks @hiteshm0 for the Pull Request.


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

avatar luX0r-reload luX0r-reload - test_item - 9 Apr 2026 - Tested successfully
avatar luX0r-reload
luX0r-reload - comment - 9 Apr 2026

I have tested this item ✅ successfully on 446c631

Thanks!


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

avatar richard67 richard67 - change - 9 Apr 2026
Status Pending Ready to Commit
Labels Added: PR-6.0-dev
avatar richard67
richard67 - comment - 9 Apr 2026

RTC


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

avatar bembelimen bembelimen - change - 15 Apr 2026
Status Ready to Commit Closed
Closed_Date 0000-00-00 00:00:00 2026-04-15 06:25:20
Closed_By bembelimen
Labels Added: RTC
avatar bembelimen bembelimen - close - 15 Apr 2026
avatar bembelimen bembelimen - change - 15 Apr 2026
Status Closed New
Closed_Date 2026-04-15 06:25:20
Closed_By bembelimen
Labels Removed: RTC
avatar bembelimen bembelimen - change - 15 Apr 2026
Status New Pending
avatar bembelimen bembelimen - reopen - 15 Apr 2026
avatar bembelimen
bembelimen - comment - 15 Apr 2026

Sorry my fault, missed this PR when deleting the branch.

avatar brianteeman
brianteeman - comment - 15 Apr 2026

Sorry my fault, missed this PR when deleting the branch.

you closed a few other pr - i assume the same reason

avatar tecpromotion tecpromotion - change - 15 Apr 2026
Title
[6.0] Catch punycode conversion exceptions to prevent crash
[6.1] Catch punycode conversion exceptions to prevent crash
avatar tecpromotion tecpromotion - edited - 15 Apr 2026
avatar hiteshm0
hiteshm0 - comment - 19 Apr 2026

@bembelimen
When this was deleted the RTC tag got removed aswell, can you please reassign it.

avatar bembelimen bembelimen - change - 19 Apr 2026
Status Pending Ready to Commit
avatar bembelimen
bembelimen - comment - 19 Apr 2026

Back to RTC


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

Add a Comment

Login with GitHub to post a comment