forked from indymedia/epicyon
reject localhost in markup
parent
dff6fe932a
commit
249cc1ab5a
|
@ -163,7 +163,7 @@ def dangerousMarkup(content: str, allowLocalNetworkAccess: bool) -> bool:
|
||||||
contentSections = content.split('<')
|
contentSections = content.split('<')
|
||||||
invalidPartials = ()
|
invalidPartials = ()
|
||||||
if not allowLocalNetworkAccess:
|
if not allowLocalNetworkAccess:
|
||||||
invalidPartials = ('127.0.', '192.168', '10.0.')
|
invalidPartials = ('localhost', '127.0.', '192.168', '10.0.')
|
||||||
invalidStrings = ('script', 'canvas', 'style', 'abbr',
|
invalidStrings = ('script', 'canvas', 'style', 'abbr',
|
||||||
'frame', 'iframe', 'html', 'body',
|
'frame', 'iframe', 'html', 'body',
|
||||||
'hr', 'allow-popups', 'allow-scripts')
|
'hr', 'allow-popups', 'allow-scripts')
|
||||||
|
|
Loading…
Reference in New Issue