From 0da6d4938249b36113e5258c136885ca6d38b548 Mon Sep 17 00:00:00 2001 From: kolaente Date: Sat, 7 Dec 2019 21:21:03 +0100 Subject: [PATCH] Length validation of task identifiers --- pkg/models/list.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/models/list.go b/pkg/models/list.go index 901865f2e..53bde652a 100644 --- a/pkg/models/list.go +++ b/pkg/models/list.go @@ -30,7 +30,7 @@ type List struct { // The description of the list. Description string `xorm:"longtext null" json:"description"` // The unique list short identifier. Used to build task identifiers. - Identifier string `xorm:"varchar(10) null" json:"identifier"` + Identifier string `xorm:"varchar(10) null" json:"identifier" valid:"runelength(0|10)" minLength:"0" maxLength:"10"` OwnerID int64 `xorm:"int(11) INDEX not null" json:"-"` NamespaceID int64 `xorm:"int(11) INDEX not null" json:"-" param:"namespace"`