mirror of https://gitlab.com/bashrc2/epicyon
Less indentation
parent
baece9e606
commit
577bf923c1
16
content.py
16
content.py
|
@ -274,13 +274,15 @@ def dangerous_css(filename: str, allow_local_network_access: bool) -> bool:
|
||||||
url_list = content.split('url(')
|
url_list = content.split('url(')
|
||||||
ctr = 0
|
ctr = 0
|
||||||
for url_str in url_list:
|
for url_str in url_list:
|
||||||
if ctr > 0:
|
if ctr == 0:
|
||||||
if ')' in url_str:
|
ctr = 1
|
||||||
url_str = url_str.split(')')[0]
|
continue
|
||||||
if string_contains(url_str, ('http', 'ipfs', 'ipns')):
|
if ')' in url_str:
|
||||||
print('ERROR: non-local web link in CSS ' +
|
url_str = url_str.split(')')[0]
|
||||||
filename)
|
if string_contains(url_str, ('http', 'ipfs', 'ipns')):
|
||||||
return True
|
print('ERROR: non-local web link in CSS ' +
|
||||||
|
filename)
|
||||||
|
return True
|
||||||
ctr += 1
|
ctr += 1
|
||||||
|
|
||||||
# an attacker can include html inside of the css
|
# an attacker can include html inside of the css
|
||||||
|
|
Loading…
Reference in New Issue