Merge pull request #4717 from papuSpartan/security
Add --server-name to the list of arguments considered insecure
This commit is contained in:
commit
ccd73fc186
|
@ -107,7 +107,7 @@ restricted_opts = {
|
||||||
"outdir_save",
|
"outdir_save",
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd_opts.disable_extension_access = (cmd_opts.share or cmd_opts.listen) and not cmd_opts.enable_insecure_extension_access
|
cmd_opts.disable_extension_access = (cmd_opts.share or cmd_opts.listen or cmd_opts.server_name) and not cmd_opts.enable_insecure_extension_access
|
||||||
|
|
||||||
devices.device, devices.device_interrogate, devices.device_gfpgan, devices.device_swinir, devices.device_esrgan, devices.device_scunet, devices.device_codeformer = \
|
devices.device, devices.device_interrogate, devices.device_gfpgan, devices.device_swinir, devices.device_esrgan, devices.device_scunet, devices.device_codeformer = \
|
||||||
(devices.cpu if any(y in cmd_opts.use_cpu for y in [x, 'all']) else devices.get_optimal_device() for x in ['sd', 'interrogate', 'gfpgan', 'swinir', 'esrgan', 'scunet', 'codeformer'])
|
(devices.cpu if any(y in cmd_opts.use_cpu for y in [x, 'all']) else devices.get_optimal_device() for x in ['sd', 'interrogate', 'gfpgan', 'swinir', 'esrgan', 'scunet', 'codeformer'])
|
||||||
|
|
5
webui.py
5
webui.py
|
@ -33,7 +33,10 @@ from modules.shared import cmd_opts
|
||||||
import modules.hypernetworks.hypernetwork
|
import modules.hypernetworks.hypernetwork
|
||||||
|
|
||||||
queue_lock = threading.Lock()
|
queue_lock = threading.Lock()
|
||||||
server_name = "0.0.0.0" if cmd_opts.listen else cmd_opts.server_name
|
if cmd_opts.server_name:
|
||||||
|
server_name = cmd_opts.server_name
|
||||||
|
else:
|
||||||
|
server_name = "0.0.0.0" if cmd_opts.listen else None
|
||||||
|
|
||||||
def wrap_queued_call(func):
|
def wrap_queued_call(func):
|
||||||
def f(*args, **kwargs):
|
def f(*args, **kwargs):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user