1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-21 18:00:56 +00:00

Make sure expiry time is in seconds

This commit is contained in:
Phillip Stagnet 2020-08-11 16:21:43 +02:00
parent 7267f5e573
commit 813a4df3c5
No known key found for this signature in database
GPG Key ID: 029E4A7879FBE381

View File

@ -224,7 +224,7 @@ func (rp *Provider) SessionRegenerate(oldsid, sid string) (session.Store, error)
c.Do(c.Context(), "SET", sid, "", "EX", rp.maxlifetime)
} else {
c.Rename(oldsid, sid)
c.Expire(sid, time.Duration(rp.maxlifetime))
c.Expire(sid, time.Duration(rp.maxlifetime) * time.Second)
}
return rp.SessionRead(sid)
}