Sanitize all text-based properties (textbox / textarea) #21634
simonech
started this conversation in
Features and ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Background / context
Umbraco provides an
IHtmlSanitizerinterface that can be used to sanitize content coming from Rich Text Editors (RTEs).This allows preventing malicious scripts, unwanted markup, or problematic formatting from being stored and rendered.
Out of the box, Umbraco ships with a No-op implementation, but projects with stricter requirements can register a custom sanitizer.
Problem statement
While RTE values go through the text sanitization pipeline, textbox and textarea properties do not.
As a result:
Html.Raw)This creates an inconsistency:
Proposed idea
Extend textbox and textarea datatypes with an optional sanitization flag.
Proposed behaviour:
(default:
true)IHtmlSanitizerpipeline as RTE contentUX consideration
To avoid confusion:
IHtmlSanitizerimplementation is registeredOpen discussion
This discussion can be used to:
Note
This ticket was discussed within the Umbraco Security & Privacy Advisors group; I’m formalising it here to gather broader feedback.
Beta Was this translation helpful? Give feedback.
All reactions