From 3ab17e228ebd10b5e045831a0a265249daaa3bbb Mon Sep 17 00:00:00 2001 From: Perfect Johny Date: Fri, 13 Nov 2026 14:27:02 +0300 Subject: [PATCH] Match the download url in the model whitelist (#3428) check_whitelist_for_model compared save_path, base and filename with the model list, but not the url the file is downloaded from, so a request with a listed name and another url was queued as given. Compare the url too. --- glob/manager_server.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/glob/manager_server.py b/glob/manager_server.py index cf16067f..da727a91 100644 --- a/glob/manager_server.py +++ b/glob/manager_server.py @@ -1736,13 +1736,13 @@ async def check_whitelist_for_model(item): json_obj = await core.get_data_by_mode('cache', 'model-list.json') for x in json_obj.get('models', []): - if x['save_path'] == item['save_path'] and x['base'] == item['base'] and x['filename'] == item['filename']: + if x['save_path'] == item['save_path'] and x['base'] == item['base'] and x['filename'] == item['filename'] and x.get('url') == item.get('url'): return True json_obj = await core.get_data_by_mode('local', 'model-list.json') for x in json_obj.get('models', []): - if x['save_path'] == item['save_path'] and x['base'] == item['base'] and x['filename'] == item['filename']: + if x['save_path'] == item['save_path'] and x['base'] == item['base'] and x['filename'] == item['filename'] and x.get('url') == item.get('url'): return True return False