fix(c2): append trailing slash to mythic /graphql URL to avoid 301 redirect
Nginx fronting Mythic 3.x redirects /graphql → /graphql/ (HTTP 301). The sprint 8 SSRF defense (allow_redirects=False) is correct and intentional; the fix is the URL, not the redirect policy. Upstream reference: mythic_utilities.get_http_transport hardcodes /graphql/ with trailing slash. Updated _GQL_URL in all three adapter test files to match. Added TestMythicAdapterUrlConstruction regression test to prevent silent regression on future refactors. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -9,7 +9,7 @@ from backend.app.services.c2.adapter import C2Error
|
||||
from backend.app.services.c2.mythic import MythicAdapter
|
||||
|
||||
_BASE_URL = "https://mythic.lab:7443"
|
||||
_GQL_URL = _BASE_URL + "/graphql"
|
||||
_GQL_URL = _BASE_URL + "/graphql/"
|
||||
_TOKEN = "fake-api-token"
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user