AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
High 71 Bitcoin

Merge branch 'fix/sanitize-rich-text-editors'

Public commit record

What the developer wrote

Authored by Nicolas Dorier

45/100 · Thin
Merge branch 'fix/sanitize-rich-text-editors'
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
The short version

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.

Recommended action

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

01

Server-side HTML sanitization added for rich-text textareas via RichTextAreaTagHelper

02

Form-related HTML tags explicitly removed from both plain and rich-text sanitizer allow-lists

03

Inline <style> tag removed from rich-text sanitizer allow-list, preventing CSS-based exfiltration/UI attacks

04

Client-side Summernote codeviewFilter disabled, shifting trust to server-side sanitization

05

New unit tests assert removal of form tags and dangerous CSS properties

06

Multiple views (Crowdfund, PointOfSale, PaymentRequest, PullPayment, Email rules, Subscriptions) migrated to the new rich-text tag helper