mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
fix(ai): broaden SSRF pre-scan regex to cover srcset, poster, formaction, @import
This commit is contained in:
@@ -10,11 +10,11 @@ import re
|
||||
import sys
|
||||
|
||||
_REMOTE_REF_RE = re.compile(
|
||||
r'(?:src|href|action)\s*=\s*["\']?\s*(https?:/{1,2}[^\s"\'>\)]{1,200})',
|
||||
r'(?:src|href|action|srcset|poster|formaction)\s*=\s*["\']?\s*(https?:/{1,2}[^\s"\'>\)]{1,200})',
|
||||
re.IGNORECASE,
|
||||
)
|
||||
_REMOTE_CSS_URL_RE = re.compile(
|
||||
r'url\s*\(\s*["\']?\s*(https?:/{1,2}[^\s"\'>\)]{1,200})',
|
||||
r'(?:url\s*\(|@import)\s*["\']?\s*(https?:/{1,2}[^\s"\'>\)]{1,200})',
|
||||
re.IGNORECASE,
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user