fix(gateway): use registered control flows
This commit is contained in:
@@ -46,10 +46,7 @@ func ValidateGatewayClipboard(policy protocol.ClipboardPolicy, value protocol.Ga
|
||||
if err := policy.Validate(); err != nil || value.Validate() != nil || !utf8.ValidString(value.Text) {
|
||||
return ErrProviderMalformed
|
||||
}
|
||||
if len(value.Text) > int(policy.MaxTextBytes) || len(value.LoopToken) < 16 || len(value.LoopToken) > 128 {
|
||||
return ErrProviderMalformed
|
||||
}
|
||||
if _, err := base64.RawURLEncoding.DecodeString(value.LoopToken); err != nil {
|
||||
if len(value.Text) > int(policy.MaxTextBytes) {
|
||||
return ErrProviderMalformed
|
||||
}
|
||||
switch value.Direction {
|
||||
|
||||
Reference in New Issue
Block a user