mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 14:10:54 +00:00
fix bad error code
By providing a unique error code instead of a format specifier without using an error formatting function.
This commit is contained in:
parent
d96289a81b
commit
3f4502990a
@ -149,7 +149,7 @@ func decodeCookie(block cipher.Block, hashKey, name, value string, gcmaxlifetime
|
|||||||
// 2. Verify MAC. Value is "date|value|mac".
|
// 2. Verify MAC. Value is "date|value|mac".
|
||||||
parts := bytes.SplitN(b, []byte("|"), 3)
|
parts := bytes.SplitN(b, []byte("|"), 3)
|
||||||
if len(parts) != 3 {
|
if len(parts) != 3 {
|
||||||
return nil, errors.New("Decode: invalid value %v")
|
return nil, errors.New("Decode: invalid value format")
|
||||||
}
|
}
|
||||||
|
|
||||||
b = append([]byte(name+"|"), b[:len(b)-len(parts[2])]...)
|
b = append([]byte(name+"|"), b[:len(b)-len(parts[2])]...)
|
||||||
|
Loading…
Reference in New Issue
Block a user