1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-25 22:41:29 +00:00

protect parts's len

This commit is contained in:
astaxie 2013-09-26 21:06:37 +08:00
parent 02c2e16253
commit d393c329c3

View File

@ -312,6 +312,10 @@ func (c *Controller) GetSecureCookie(Secret, key string) (string, bool) {
parts := strings.SplitN(val, "|", 3)
if len(parts) != 3 {
return "", false
}
vs := parts[0]
timestamp := parts[1]
sig := parts[2]