aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/gorilla/securecookie
diff options
context:
space:
mode:
authorNiall Sheridan <nsheridan@gmail.com>2016-10-08 16:02:50 -0500
committerNiall Sheridan <nsheridan@gmail.com>2016-10-08 16:02:50 -0500
commitbaf7141d1dd0f99d561a2197a909c66dd389809d (patch)
tree92c176f713b0b28893344261b1e567db5e30ba79 /vendor/github.com/gorilla/securecookie
parent696aebffe56853345d679d4d2b3051236423c6db (diff)
Update dependencies
Diffstat (limited to 'vendor/github.com/gorilla/securecookie')
-rw-r--r--vendor/github.com/gorilla/securecookie/securecookie.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/vendor/github.com/gorilla/securecookie/securecookie.go b/vendor/github.com/gorilla/securecookie/securecookie.go
index 83dd606..cd4e097 100644
--- a/vendor/github.com/gorilla/securecookie/securecookie.go
+++ b/vendor/github.com/gorilla/securecookie/securecookie.go
@@ -102,6 +102,7 @@ var (
errTimestampExpired = cookieError{typ: decodeError, msg: "expired timestamp"}
errDecryptionFailed = cookieError{typ: decodeError, msg: "the value could not be decrypted"}
errValueNotByte = cookieError{typ: decodeError, msg: "value not a []byte."}
+ errValueNotBytePtr = cookieError{typ: decodeError, msg: "value not a pointer to []byte."}
// ErrMacInvalid indicates that cookie decoding failed because the HMAC
// could not be extracted and verified. Direct use of this error
@@ -474,12 +475,11 @@ func (e NopEncoder) Serialize(src interface{}) ([]byte, error) {
// Deserialize passes a []byte through as-is.
func (e NopEncoder) Deserialize(src []byte, dst interface{}) error {
- if _, ok := dst.([]byte); ok {
- dst = src
+ if dat, ok := dst.(*[]byte); ok {
+ *dat = src
return nil
}
-
- return errValueNotByte
+ return errValueNotBytePtr
}
// Encoding -------------------------------------------------------------------