Potential catch for if somehow a user sends a delete model with a .. in it.
This commit is contained in:
parent
899f191b51
commit
f444ad851f
|
@ -3097,7 +3097,7 @@ def get_message(msg):
|
||||||
else:
|
else:
|
||||||
get_model_info(vars.model)
|
get_model_info(vars.model)
|
||||||
elif(msg['cmd'] == 'delete_model'):
|
elif(msg['cmd'] == 'delete_model'):
|
||||||
if "{}/models".format(os.getcwd()) in msg['data'] or "{}\\models".format(os.getcwd()) in msg['data']:
|
if "{}/models".format(os.getcwd()) in os.path.abspath(msg['data']) or "{}\\models".format(os.getcwd()) in os.path.abspath(msg['data']):
|
||||||
if check_if_dir_is_model(msg['data']):
|
if check_if_dir_is_model(msg['data']):
|
||||||
print("It's a model, now we really will kill it")
|
print("It's a model, now we really will kill it")
|
||||||
import shutil
|
import shutil
|
||||||
|
|
Loading…
Reference in New Issue