v4: Respect bypass_ssl in share requests (#3411)

The comfyworkflows share requests in glob/share_3rdparty.py built their
connectors with verify_ssl=False, so certificates were not verified
whatever the bypass_ssl setting said.

Use verify_ssl=not manager_util.bypass_ssl, as manager_util.get_data
does. Verification is on by default, and bypass_ssl = True still turns
it off. The copy under legacy/ is unchanged.
This commit is contained in:
Benjamin Kincses
2026-11-12 19:48:51 +09:00
committed by GitHub
parent ad3a2b862b
commit 9e72648931
+5 -4
View File
@@ -1,5 +1,6 @@
import mimetypes
from ..common import context
from ..common import manager_util
from . import manager_core as core
import os
@@ -284,7 +285,7 @@ async def share_art(request):
share_endpoint = f"{share_website_host}/api"
# get presigned urls
async with aiohttp.ClientSession(trust_env=True, connector=aiohttp.TCPConnector(verify_ssl=False)) as session:
async with aiohttp.ClientSession(trust_env=True, connector=aiohttp.TCPConnector(verify_ssl=not manager_util.bypass_ssl)) as session:
async with session.post(
f"{share_endpoint}/get_presigned_urls",
json={
@@ -302,12 +303,12 @@ async def share_art(request):
workflowJsonFileKey = presigned_urls_json["workflowJsonFileKey"]
# upload asset
async with aiohttp.ClientSession(trust_env=True, connector=aiohttp.TCPConnector(verify_ssl=False)) as session:
async with aiohttp.ClientSession(trust_env=True, connector=aiohttp.TCPConnector(verify_ssl=not manager_util.bypass_ssl)) as session:
async with session.put(assetFilePresignedUrl, data=open(asset_filepath, "rb")) as resp:
assert resp.status == 200
# upload workflow json
async with aiohttp.ClientSession(trust_env=True, connector=aiohttp.TCPConnector(verify_ssl=False)) as session:
async with aiohttp.ClientSession(trust_env=True, connector=aiohttp.TCPConnector(verify_ssl=not manager_util.bypass_ssl)) as session:
async with session.put(workflowJsonFilePresignedUrl, data=json.dumps(prompt['workflow']).encode('utf-8')) as resp:
assert resp.status == 200
@@ -323,7 +324,7 @@ async def share_art(request):
}
# make a POST request to /api/upload_workflow with form data key values
async with aiohttp.ClientSession(trust_env=True, connector=aiohttp.TCPConnector(verify_ssl=False)) as session:
async with aiohttp.ClientSession(trust_env=True, connector=aiohttp.TCPConnector(verify_ssl=not manager_util.bypass_ssl)) as session:
form = aiohttp.FormData()
if comfyworkflows_sharekey:
form.add_field("shareKey", comfyworkflows_sharekey)