mirror of
https://github.com/langgenius/dify.git
synced 2026-05-27 20:36:18 +08:00
[autofix.ci] apply automated fixes
This commit is contained in:
@ -43,9 +43,7 @@ _UPLOAD_FILE_PATH_PATTERN = re.compile(
|
||||
r"^/files/(?P<file_id>[a-fA-F0-9-]+)/(?P<preview_kind>file-preview|image-preview)$"
|
||||
)
|
||||
_TOOL_FILE_PATH_PATTERN = re.compile(r"^/files/tools/(?P<file_id>[a-fA-F0-9-]+)\.(?P<extension>[^/]+)$")
|
||||
_DATASOURCE_FILE_PATH_PATTERN = re.compile(
|
||||
r"^/files/datasources/(?P<file_id>[a-fA-F0-9-]+)\.(?P<extension>[^/]+)$"
|
||||
)
|
||||
_DATASOURCE_FILE_PATH_PATTERN = re.compile(r"^/files/datasources/(?P<file_id>[a-fA-F0-9-]+)\.(?P<extension>[^/]+)$")
|
||||
|
||||
_file_access_controller = DatabaseFileAccessController()
|
||||
|
||||
|
||||
@ -127,10 +127,7 @@ def test_invalid_signature_delegates_to_ssrf_proxy(monkeypatch):
|
||||
proxy_response = httpx.Response(403, request=httpx.Request("GET", "http://localhost:5001/bad"))
|
||||
ssrf_get = MagicMock(return_value=proxy_response)
|
||||
monkeypatch.setattr(remote_fetcher.ssrf_proxy, "get", ssrf_get)
|
||||
url = (
|
||||
f"http://localhost:5001/files/{UPLOAD_FILE_ID}/file-preview"
|
||||
"?timestamp=1700000000&nonce=nonce&sign=bad"
|
||||
)
|
||||
url = f"http://localhost:5001/files/{UPLOAD_FILE_ID}/file-preview?timestamp=1700000000&nonce=nonce&sign=bad"
|
||||
|
||||
response = remote_fetcher.get(url, timeout=3)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user