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

Logout Module emitting invalid html. Update default_logout.php (enclose params JRoute parameter in htmlentities) #17367

Closed
wants to merge 1 commit into from

Conversation

LivioCavallo
Copy link
Contributor

@LivioCavallo LivioCavallo commented Jul 31, 2017

Enclose JRoute param in htmlentities to emit valid html.
The getInstance part is right, but params remains unprotected, can emit invalid html!

Pull Request for Issue # .

Summary of Changes

Testing Instructions

Create some contacts with associated tags
Create a menu item of type tagged-elements of contacts type
Publish a login/logout module on that page.

Expected result

valid html

Actual result

Invalid html. The logout form url contains invalid '[' and ']' chars; th eurl will be similar to (when sef url disabled): /index.php?option=com_tags&view=tag&id[0]=2&types[0]=2&Itemid=nnn

This problem is related to issue "Bug in AbstractUri::buildQuery - invalid HTML emitted ('[' and ']' not encoded in tagged elements list) #21" (joomla-framework/uri#21).

I think the preferred way to solve both problems is solving the above mentioned problem in AbstractUri:buildQuery

Similar problem in PR #17368

Documentation Changes Required

Enclose JRoute param in htmlentities to emit valid html.
The getInstance part is right, but params remains unprotected, can emit invalid html!
@ghost
Copy link

ghost commented Jul 31, 2017

can you please give Test Instuctions?

@LivioCavallo
Copy link
Contributor Author

To reproduce the problem please do the following:

Create some contacts with associated tags
Create a menu item of type tagged-elements of contacts type
Publish a login/logout module on that page.
The logout form on that page will have a url similar to (when sef url disabled): /index.php?option=com_tags&view=tag&id[0]=2&types[0]=2&Itemid=132

As you can see the emitted html is invalid: the query part has in fact illegal characters in it, '[' and ']'; we should let that chars encoded!

This problem is related to issue "Bug in AbstractUri::buildQuery - invalid HTML emitted ('[' and ']' not encoded in tagged elements list) #21" (joomla-framework/uri#21).

I think the preferred way to solve both problems is solving the above mentioned problem in AbstractUri:buildQuery.

Similar problem in PR #17368

@LivioCavallo
Copy link
Contributor Author

I detected the problem here (in login form) but it does not originate here and in no way this is a fix.
Sorry, my confusion deriving from a J!3.4.3 workaround...

The problem remains (tagged emelents menu item emits invalid html).

@LivioCavallo
Copy link
Contributor Author

I close this PR and related #17368

@LivioCavallo LivioCavallo deleted the patch-1 branch August 1, 2017 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants