You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add string validation for a few string fields
Since we disable utf8 string validation from proto level, we want to
enforce minimal validation for some key fields.
Unit tests
No
<!-- Have you made sure this change doesn't falsify anything currently
stated in `docs/`? If significant
new behavior is added, have you described that in `docs/`? -->
<!-- Is this PR a hotfix candidate or does it require a notification to
be sent to the broader community? (Yes/No) -->
returnfailedCause, serviceerror.NewInvalidArgument(fmt.Sprintf("WorkflowId is not set on RequestCancelExternalWorkflowExecutionCommand. Namespace=%s RunId=%s", ns, runID))
returnfailedCause, serviceerror.NewInvalidArgument("Invalid RunId set on command.")
504
522
}
@@ -540,6 +558,22 @@ func (v *commandAttrValidator) validateSignalExternalWorkflowExecutionAttributes
540
558
}
541
559
542
560
targetRunID:=attributes.Execution.GetRunId()
561
+
signalName:=attributes.SignalName
562
+
workflowID:=attributes.Execution.WorkflowId
563
+
ns:=attributes.Namespace
564
+
565
+
ifworkflowID=="" {
566
+
returnfailedCause, serviceerror.NewInvalidArgument(fmt.Sprintf("WorkflowId is not set on SignalExternalWorkflowExecutionCommand. Namespace=%s RunId=%s SignalName=%s", ns, targetRunID, signalName))
0 commit comments