From 6e045483fa5f316b9648b3b04611b33262b1b62c Mon Sep 17 00:00:00 2001 From: Aevann Date: Fri, 26 Jan 2024 00:44:35 +0200 Subject: [PATCH] disallow scale and rotate being used concurrently --- files/helpers/sanitize.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/files/helpers/sanitize.py b/files/helpers/sanitize.py index 2666f1668..345c1bb6d 100644 --- a/files/helpers/sanitize.py +++ b/files/helpers/sanitize.py @@ -39,6 +39,8 @@ allowed_styles = ['background-color', 'color', 'filter', 'font-weight', 'text-al def allowed_attributes(tag, name, value): if name == 'style': + if 'transform' in value.lower() and 'scale' in value.lower() and 'rotate' in value.lower(): + return False return True if tag == 'marquee':