fix broken send to extras button
This commit is contained in:
parent
82cfc227d7
commit
3e22e29413
@ -37,7 +37,10 @@ def quote(text):
|
|||||||
|
|
||||||
|
|
||||||
def image_from_url_text(filedata):
|
def image_from_url_text(filedata):
|
||||||
if type(filedata) == dict and filedata["is_file"]:
|
if type(filedata) == list and len(filedata) > 0 and type(filedata[0]) == dict and filedata[0].get("is_file", False):
|
||||||
|
filedata = filedata[0]
|
||||||
|
|
||||||
|
if type(filedata) == dict and filedata.get("is_file", False):
|
||||||
filename = filedata["name"]
|
filename = filedata["name"]
|
||||||
is_in_right_dir = ui_tempdir.check_tmp_file(shared.demo, filename)
|
is_in_right_dir = ui_tempdir.check_tmp_file(shared.demo, filename)
|
||||||
assert is_in_right_dir, 'trying to open image file outside of allowed directories'
|
assert is_in_right_dir, 'trying to open image file outside of allowed directories'
|
||||||
|
Loading…
Reference in New Issue
Block a user