Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix(api): point SSRF-blocked error message at the correct dify issue (#40605)

chelsealongb537fed9076c
diff --git a/api/core/helper/ssrf_proxy.py b/api/core/helper/ssrf_proxy.py
index 95b07c36903..7831516b293 100644
--- a/api/core/helper/ssrf_proxy.py
+++ b/api/core/helper/ssrf_proxy.py
@@ -260,7 +260,7 @@ def make_request(
f"(e.g. SSRF_PROXY_ALLOW_PRIVATE_IPS=172.21.0.0/16 to "
f"allow 172.21.0.0/16). The URL resolves to a private, "
f"loopback, link-local, or otherwise non-public network "
- f"address. See https://github.com/infiniflow/ragflow/issues/38443."
+ f"address. See https://github.com/langgenius/dify/issues/38443."
)
if response.status_code not in STATUS_FORCELIST or max_retries == 0:
diff --git a/api/tests/unit_tests/core/helper/test_ssrf_proxy.py b/api/tests/unit_tests/core/helper/test_ssrf_proxy.py
index 5b51a99aa58..458f2efd05b 100644
--- a/api/tests/unit_tests/core/helper/test_ssrf_proxy.py
+++ b/api/tests/unit_tests/core/helper/test_ssrf_proxy.py
@@ -399,8 +399,9 @@ def test_squid_block_raises_actionable_tool_ssrf_error(mock_get_client) -> None:
# The remediation hint must include a concrete example, otherwise users
# still have to grep the squid config to figure out the syntax.
assert "172.21.0.0/16" in msg
- # And it must point to the issue so maintainers can find context.
- assert "issues/38443" in msg
+ # And it must point to the dify issue so maintainers can find context
+ # (not some other project's tracker with a coincidentally matching number).
+ assert "https://github.com/langgenius/dify/issues/38443" in msg
@patch("core.helper.ssrf_proxy._get_ssrf_client", autospec=True)