From 6358276460067b9dbe912e235144b84ee2998e6b Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Mon, 27 Jan 2025 11:02:28 -0500 Subject: [PATCH] warn if using public interface without auth Signed-off-by: Vladimir Mandic --- CHANGELOG.md | 1 + webui.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 854622ca7..defe0e1d2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -62,6 +62,7 @@ - unified standard and modern-ui authentication method & cleanup auth logging - detect & report local/external/public ip addresses if using `listen` mode - detect *docker* enforced limits instead of system limits if running in a container + - warn if using public interface without authentication - **Fixes**: - non-full vae decode - send-to image transfer diff --git a/webui.py b/webui.py index bd99bfc1d..d036e6ad3 100644 --- a/webui.py +++ b/webui.py @@ -306,6 +306,8 @@ def start_ui(): gr_tempdir.register_tmp_file(shared.demo, os.path.join(shared.cmd_opts.data_dir, 'x')) shared.log.info(f'Local URL: {local_url}') if shared.cmd_opts.listen: + if not gradio_auth_creds: + shared.log.warning('Public interface enabled without authentication') proto = 'https' if shared.cmd_opts.tls_keyfile is not None else 'http' external_ip = get_external_ip() if external_ip is not None: