[4.4] Check pagination parameters from request, another try#44023
Merged
MacJoom merged 7 commits intojoomla:4.4-devfrom Sep 23, 2024
Merged
[4.4] Check pagination parameters from request, another try#44023MacJoom merged 7 commits intojoomla:4.4-devfrom
MacJoom merged 7 commits intojoomla:4.4-devfrom
Conversation
Contributor
|
This PR re-introduces the issue that was fixed in the security release. |
Member
Author
|
I updated the PR, it now takes only allowed parameters. |
Contributor
|
Testing now, after getting more information, it seems to be working fine for me. I will do more tests to confirm this PR. Thank you. |
Contributor
|
I have tested this item ✅ successfully on 097ef2e This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/44023. |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Member
Author
Contributor
|
I have tested this item ✅ successfully on 399ab15 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/44023. |
Contributor
|
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/44023. |
Contributor
|
Thank you! |
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of Changes
Existing approach still have a problem, it is always forcing the parameters defined in
$defaultUrlParams, and make it impossible to remove.I suggest a different approach, take the allowed parameters from the router, and filtering them before adding. Also this now happen in the pagination constructor, which allows for developers to unset unneeded params.
Testing Instructions
Code review. Test with your component.
Or, add following code, somewhere here
joomla-cms/templates/cassiopeia/index.php
Line 202 in 67cd90e
Then open any page with
?tmpl=indexin URL, and check pagination links.Actual result BEFORE applying this Pull Request
Somehow works.
Pagination links contain
?tmpl=index.Expected result AFTER applying this Pull Request
Works but better.
Pagination links without
?tmpl=index.Link to documentations
Please select: