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

XSS issue: </textarea> not escaped on comment editing form #263

Closed
hi2u opened this issue Nov 28, 2016 · 1 comment
Closed

XSS issue: </textarea> not escaped on comment editing form #263

hi2u opened this issue Nov 28, 2016 · 1 comment
Assignees

Comments

@hi2u
Copy link

hi2u commented Nov 28, 2016

This is really a cphalcon level issue, so I've posted the main issue there: phalcon/cphalcon#12428

But I've noticed the Phalcon forum itself isn't accounting for this, probably like most other Phalcon sites out there.

See my demo post here: https://forum.phalconphp.com/discussion/14891/this-is-a-demonstration-of-phalcons-inconsistent-text-and-textar#C43323

By entering that text as my first comment, then returning to form to edit the comment, I got the form to do this:

2016-11-28 13_06_22-edit discussion_ this is a demonstration of phalcon 039 s inconsistent text and

Also it seems that the <title> is either filtering on input or output and causing an escaping issue. View the source of that forum post, and you'll see

<title>This is a demonstration of Phalcon&amp;#039;s inconsistent Text and TextArea escaping - Discussion - Phalcon Framework</title>

When hovering on my browser tab, that displays as:

This is a demonstration of Phalcon&#039;s inconsistent Text and TextArea escaping

It should instead be:

This is a demonstration of Phalcon's inconsistent Text and TextArea escaping

@sergeyklay
Copy link
Member

@hi2u

Thank you for pointing the problem in the forum source code.

As @niden has already explained to you in phalcon/cphalcon#12428, we can't make the changes you are talking about, in the current branch Phalcon API, because it would break backward compatibility. Many projects escape output independently.

You can see how to get rid of this problem in my commit: d664062

To do so, you don't need to release a new version of Phalcon or even worse, break working projects which already use escaping.

Fixed in the 3.0.x branch. I'll release a new minor Forum version as soon as possible.
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants