[14.0][FIX] document_page: Stored XSS

unitary tests added

post-migration script added
This commit is contained in:
SergiCForgeFlow
2023-08-10 12:55:29 +02:00
parent d1b2e58312
commit eda3c2a1cb
9 changed files with 52 additions and 15 deletions

View File

@@ -27,7 +27,7 @@ class DocumentPage(models.Model):
"document.page", "Category", domain=[("type", "=", "category")]
)
child_ids = fields.One2many("document.page", "parent_id", "Children")
content = fields.Text(
content = fields.Html(
"Content",
compute="_compute_content",
inverse="_inverse_content",

View File

@@ -16,7 +16,7 @@ class DocumentPageHistory(models.Model):
page_id = fields.Many2one("document.page", "Page", ondelete="cascade")
name = fields.Char(index=True)
summary = fields.Char(index=True)
content = fields.Text()
content = fields.Html()
diff = fields.Text(compute="_compute_diff")
company_id = fields.Many2one(