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

Form Builder and Form Runner to sanitize all HTML input and output #6533

Open
ebruchez opened this issue Oct 4, 2024 · 2 comments
Open

Form Builder and Form Runner to sanitize all HTML input and output #6533

ebruchez opened this issue Oct 4, 2024 · 2 comments

Comments

@ebruchez
Copy link
Collaborator

ebruchez commented Oct 4, 2024

  • check: do we filter HTML tags in LHHA/output?
@ebruchez
Copy link
Collaborator Author

As part of #6550, we have some improved code for sanitation. But it doesn't yet run in the JS environment because we depend on TagSoup. We should migrate to something newer, which supports JVM and JS, either written in Scala or with both a JVM and a JS implementation.

@ebruchez
Copy link
Collaborator Author

ebruchez commented Dec 5, 2024

There are places where the user can enter HTML via the rich text editor, or via the plain text editor and then converting to HTML. In all those places, we need to sanitize input at design-time as a first step. This includes:

  • inline label and hint editors
    • when entering as HTML
    • when converting from plain text to HTML
  • in dialogs, LHH
    • when converting from plain text to HTML
    • in other cases, the TinyMCE input is sanitized
  • email templates
    • when converting from plain text to HTML
    • in other cases, the TinyMCE input is sanitized
  • other?
  • In addition, the source code editor should sanitize HTML resources that we know about.

We realize that at design-time, not everything can be caught, since some outputs can be calculated. In that case, and also to protect against bad data, bugs, etc., at runtime, any and all HTML output should be sanitized as well:

  • xf:output
  • LHHA
  • other?

@ebruchez ebruchez changed the title Form Builder to sanitize HTML input for labels, etc. Form Builder and Form Runner to sanitize all HTML input and output Dec 5, 2024
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

1 participant