Skip to content

Commit

Permalink
Fix of-by-one for ET name length
Browse files Browse the repository at this point in the history
Signed-off-by: davis-haba <davishaba@google.com>
  • Loading branch information
davis-haba committed Oct 19, 2023
1 parent d8654c5 commit b37ef2b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/expansion/system.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func ValidateTemplate(template *expansionunversioned.ExpansionTemplate) error {
if k == "" {
return fmt.Errorf("ExpansionTemplate has empty name field")
}
if len(k) > 64 {
if len(k) >= 64 {
return fmt.Errorf("ExpansionTemplate name must be less than 64 characters")
}
if template.Spec.TemplateSource == "" {
Expand Down

0 comments on commit b37ef2b

Please sign in to comment.