Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.2] [Guided Tours] Fix validation of the tour relative URL #44122

Draft
wants to merge 5 commits into
base: 5.2-dev
Choose a base branch
from

Conversation

obuisard
Copy link
Contributor

@obuisard obuisard commented Sep 22, 2024

Pull Request for Issue #40020.

Summary of Changes

The tour's relative URL path is not validated and can lead to 404 errors once run.

Testing Instructions

Go to System -> Manage section -> Guided Tours.
Enter one of the core tours.
Change the path of the relative URL.
Try different combinations, for instance:

/administrator/index.php
administrator/index.php2
administrator/tada/index.php
https://_[your host here]_/administrator/index.php
administrator/index.php?option=com_banners&view=bannersqq

Actual result BEFORE applying this Pull Request

The URL is saved no matter what.

Expected result AFTER applying this Pull Request

There is an error message if the URL is not correct or does not lead to any valid page.

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

@obuisard obuisard changed the title [5.2] [Guided Tours] [5.2] [Guided Tours] Fix validation of the tour relative URL Sep 22, 2024
@sdwjoomla
Copy link
Contributor

sdwjoomla commented Sep 22, 2024

I have tested this item 🔴 unsuccessfully on 0c5c222

Go to System -> Manage section -> Guided Tours
Steps to recreate error:

Edit "How to create banners?" tour
Changed URL from administrator/index.php?option=com_banners&view=banners to administrator/index.php?option=com_banners&view=bannersqq
Save and Close
Run tour
An error has occurred.
404 View not found [name, type, prefix]: bannersqq, html, Administrator
Under tour pop-up continues


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

@sdwjoomla
Copy link
Contributor

screenshot of error
2024-09-22_10-52-50

@obuisard
Copy link
Contributor Author

I have tested this item 🔴 unsuccessfully on 0c5c222Go to System -> Manage section -> Guided Tours Steps to recreate error:

Edit "How to create banners?" tour Changed URL from administrator/index.php?option=com_banners&view=banners to administrator/index.php?option=com_banners&view=bannersqq Save and Close Run tour An error has occurred. 404 View not found [name, type, prefix]: bannersqq, html, Administrator Under tour pop-up continues

Thank you Shirielle @sdwjoomla for the test. I confirm that URLs do validate even when the queries after the ? in the URL are wrong.

@tecpromotion tecpromotion marked this pull request as draft September 24, 2024 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants