mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-01 01:51:44 +00:00
Potential fix for pull request finding 'CodeQL / Incomplete URL substring sanitization'
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
This commit is contained in:
parent
d7d1503595
commit
9835f57e9c
1 changed files with 5 additions and 2 deletions
|
|
@ -26,7 +26,7 @@ import json
|
|||
import sys
|
||||
import argparse
|
||||
from pathlib import Path
|
||||
from urllib.parse import urljoin
|
||||
from urllib.parse import urljoin, urlparse
|
||||
|
||||
try:
|
||||
import requests
|
||||
|
|
@ -86,7 +86,10 @@ def check_deps(workflow_path: str, host: str = "http://127.0.0.1:8188", api_key:
|
|||
if api_key:
|
||||
headers["X-API-Key"] = api_key
|
||||
|
||||
is_cloud = "cloud.comfy.org" in host or api_key is not None
|
||||
parsed_host = urlparse(host)
|
||||
hostname = (parsed_host.hostname or "").lower()
|
||||
is_cloud_host = hostname == "cloud.comfy.org" or hostname.endswith(".cloud.comfy.org")
|
||||
is_cloud = is_cloud_host or api_key is not None
|
||||
base = host.rstrip("/")
|
||||
|
||||
# Get installed node types
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue