mirror of
https://github.com/astaxie/beego.git
synced 2024-12-26 12:30:50 +00:00
protect parts's len
This commit is contained in:
parent
02c2e16253
commit
d393c329c3
@ -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]
|
||||
|
Loading…
Reference in New Issue
Block a user