Special characters which are used for XSS can be saved as an input without any warning
written-by
Solyom Nagy-Györkös
How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!
While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.
legacy-article
learn-legacy-article-disclaimer-text
Issue
- Characters as
<, >, /, (, ), ", ' which can be used to make scripts, used in HTML and JavaScript are valid to use in the portal as inputs and values, and it can raise security questions
- The use of these characters did not throw any warning or error messages, neither on the UI nor in the logs
Resolution
- It is the intended behavior, as long as they are correctly escaped/unescaped by the portal
- Many penetration testing tools can raise a warning about this usage, please note, these are false positive cases. Where the input needs to be a text, the portal escapes the characters, therefore they are treated as a normal characters and cannot initiate any actions
did-this-article-resolve-your-issue