Skip to content

Commit

Permalink
Limit description length for node.
Browse files Browse the repository at this point in the history
  • Loading branch information
robinjhuang committed Jun 3, 2024
1 parent dae2fbb commit a8084f8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions mapper/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ func ValidateNode(node *drip.Node) error {
return fmt.Errorf(err)
}
}
if node.Description != nil {
if len(*node.Description) > 1000 {
return fmt.Errorf("description is too long")
}
}
return nil
}

Expand Down

0 comments on commit a8084f8

Please sign in to comment.