接入本机人工处置协议和终端并记录Linux回归进度

This commit is contained in:
xuans committed 2026-10-03 21:33:54 +08:00
1 parent bf4caebaae
commit 0f2e6bfcce
24 files changed
+1534 -48

No files matched your search

@@ -50,7 +50,7 @@ func writeRecoveryResponse(ctx context.Context, writer io.Writer, response Respo
if response.Inspection == nil {
return writeFrame(writer, response)
}
if !validInspectionPayload(response.Inspection) || response.InspectionPart != nil || response.RecoveryPage != nil {
if !validInspectionPayload(response.Inspection) || response.InspectionPart != nil || response.RecoveryPage != nil || hasDispositionPayload(response) {
return ErrProtocol
}
encoded, err := json.Marshal(response)
@@ -95,7 +95,7 @@ func readInspectionParts(reader *bufio.Reader, first Response) (*deployment.Reco
}
}
part := response.InspectionPart
if !validChallenge(response) || response.Nonce != first.Nonce || len(response.Methods) != 0 || response.RecoveryAvailable ||
if !validChallenge(response) || response.Nonce != first.Nonce || len(response.Methods) != 0 || response.RecoveryAvailable || hasDispositionPayload(response) ||
response.Inspection != nil || response.RecoveryPage != nil || part == nil || part.Index != index || part.Total != total ||
len(part.Data) == 0 || len(part.Data) > inspectionPartSize || (index < total-1 && len(part.Data) != inspectionPartSize) {
return nil, ErrProtocol