Merge branch 'fix/sanitize-rich-text-editors'
What changed, and why it matters
This commit hardens how BTCPay Server handles rich-text fields (like item descriptions and email bodies). It replaces a client-side editor filter with server-side HTML sanitization, strips out HTML form elements such as <input> and <button>, and removes inline <style> blocks from rich text. These changes reduce the risk that a store owner or attacker could inject malicious HTML that tricks users into unintended actions or leaks information. The patch also expands the list of allowed embedded video/social-media sites and adds unit tests for the new behavior.
Treat this as a security hardening patch and include it in the next release. Review whether any other views still use the legacy richtext class without the rich-text tag helper, and ensure server-side sanitization is applied consistently. Consider whether disabling codeviewFilter entirely is acceptable for administrators who need raw HTML editing, and document the new trusted iframe allow-list behavior.
Security signals we found
Server-side HTML sanitization added for rich-text textareas via RichTextAreaTagHelper
Form-related HTML tags explicitly removed from both plain and rich-text sanitizer allow-lists
Inline <style> tag removed from rich-text sanitizer allow-list, preventing CSS-based exfiltration/UI attacks
Client-side Summernote codeviewFilter disabled, shifting trust to server-side sanitization
New unit tests assert removal of form tags and dangerous CSS properties
Multiple views (Crowdfund, PointOfSale, PaymentRequest, PullPayment, Email rules, Subscriptions) migrated to the new rich-text tag helper
Evidence from the diff
The merge introduces a new RichTextAreaTagHelper that runs server-side HTML sanitization on textarea content marked with the rich-text attribute. HtmlSanitizerFactory now removes form-related tags (form, input, textarea, button, select, etc.) from both plain and rich-text sanitizers, and CreateRichText no longer allows the