mirror of
https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak.git
synced 2026-12-03 03:52:50 +08:00
fix: explain TeamSpeak connection failures
This commit is contained in:
1 parent
06e5cc6d8b
commit
aef1f68875
9 files changed
+234
-24
No files matched your search
@@ -128,6 +128,12 @@ export function createWebServer(options: WebServerOptions): WebServer {
|
||||
// not a trust boundary and must not bypass SSRF protection.
|
||||
target = await resolveSafeOpenTarget(target);
|
||||
if (!isDefault) serverPassword = typeof body.serverPassword === "string" ? body.serverPassword.slice(0, 512) : "";
|
||||
else if (typeof body.serverPassword === "string" && body.serverPassword.trim()) serverPassword = body.serverPassword.slice(0, 512);
|
||||
} else if (policy.accessMode === "fixed" && typeof body.serverPassword === "string" && body.serverPassword.trim()) {
|
||||
// The fixed target remains administrator-controlled, but a user may
|
||||
// retry its server password after the gateway reports that one is
|
||||
// required. The target itself is never taken from this request.
|
||||
serverPassword = body.serverPassword.slice(0, 512);
|
||||
}
|
||||
} catch {
|
||||
response.status(400).json({ ok: false, code: "TARGET_NOT_ALLOWED" });
|
||||
|
||||
Reference in new issue
Block a user