fix: harden docker api validation, handle sftp errors, and fix node manager ui

This commit is contained in:
SaelixCode
2026-03-18 14:13:07 -04:00
parent 69e86a0a37
commit 4bd80e29bf
5 changed files with 43 additions and 13 deletions
+6
View File
@@ -112,6 +112,12 @@ export class NodeRegistry {
try {
const docker = this.createDockerClient(node);
const info = await docker.info();
// Validate the payload contains actual Docker daemon info, not arbitrary HTML
if (!info || !info.OperatingSystem || typeof info.Containers !== 'number') {
throw new Error("Invalid response from Docker API. Did you provide a web port instead of the Docker daemon port?");
}
db.updateNodeStatus(nodeId, 'online');
return {
success: true,