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

Link action button unescape presents XSS risk #9325

Closed
asmecher opened this issue Sep 25, 2023 · 1 comment
Closed

Link action button unescape presents XSS risk #9325

asmecher opened this issue Sep 25, 2023 · 1 comment
Assignees
Milestone

Comments

@asmecher
Copy link
Member

asmecher commented Sep 25, 2023

Describe the bug
The series of escaping, filtering and unescaping in/around

{$_labelTitle|strip_unsafe_html|unescape:'html'}
is confusing and presents an XSS risk.

This follows from #2564.

Callers should be able to pass content into this template (via instantiation of the LinkAction object and subclasses) in one of three ways:

There shouldn't be any need for an unescape call in linkActionButton.tpl -- it only confuses things. For example, applying a strip_unsafe_html before an unescape gives the impression that escaping is handled, but if the incoming label is already HTML, the filtering won't be applied (as expected)!

PRs

Stable-3.4.0

pkp-lib --> #9331
ojs --> pkp/ojs#4048 [TEST ONLY]

@asmecher
Copy link
Member Author

asmecher commented Oct 5, 2023

Merged!

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

No branches or pull requests

2 participants