security: disallow import statements in CSS
This commit is contained in:
parent
92bd7d50fa
commit
71406da834
1 changed files with 1 additions and 0 deletions
|
@ -377,4 +377,5 @@ def validate_css(css:str) -> tuple[bool, str]:
|
|||
practical concern) or causing styling issues with the rest of the page.
|
||||
'''
|
||||
if '</style' in css.lower(): return False, "Invalid CSS"
|
||||
if '@import' in css.lower(): return False, "@import statements are not allowed"
|
||||
return True, ""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue