Language: Go
Label: safe
CWE: CWE-613 \u2014 Insufficient Session Expiration
According to WASC, "Insufficient Session Expiration is when a web site permits an attacker to reuse old session credentials or session IDs for authorization."

Code:
func (r *GetUserResp) GetFromUserEntity(userInfo *entity.User) {
	_ = copier.Copy(r, userInfo)
	r.Avatar = FormatAvatarInfo(userInfo.Avatar, userInfo.EMail)
	r.CreatedAt = userInfo.CreatedAt.Unix()
	r.LastLoginDate = userInfo.LastLoginDate.Unix()
	statusShow, ok := UserStatusShow[userInfo.Status]
	if ok {
		r.Status = statusShow
	}
	r.HavePassword = len(userInfo.Pass) > 0
}