Fixing lint error

This commit is contained in:
Costel Moraru 2019-04-09 15:17:40 +03:00
parent 6da6ee7f84
commit f5a6609b45

View File

@ -187,15 +187,15 @@ func DecodeSessionState(v string, c *cookie.Cipher) (*SessionState, error) {
} else {
// Backward compatibility with using unecrypted Email
if ss.Email != "" {
decryptedEmail, err := c.Decrypt(ss.Email)
if err == nil {
decryptedEmail, errEmail := c.Decrypt(ss.Email)
if errEmail == nil {
ss.Email = decryptedEmail
}
}
// Backward compatibility with using unecrypted User
if ss.User != "" {
decryptedUser, err := c.Decrypt(ss.User)
if err == nil {
decryptedUser, errUser := c.Decrypt(ss.User)
if errUser == nil {
ss.User = decryptedUser
}
}