fix: fix srun md5 logic

reference to #31
This commit is contained in:
Mmx233
2024-03-23 16:51:53 +08:00
parent 575aad904a
commit 99b43d403c
2 changed files with 13 additions and 6 deletions

View File

@@ -96,7 +96,10 @@ func (c Srun) DoLogin(clientIP string) error {
infoPrefix = fmt.Sprintf("{%s}", c.LoginInfo.Meta.InfoPrefix)
}
EncryptedInfo := infoPrefix + Base64(XEncode(string(info), tokenStr))
Md5Str := Md5(tokenStr)
Md5Str, err := Md5(tokenStr, c.LoginInfo.Form.Password)
if err != nil {
return err
}
EncryptedMd5 := "{MD5}" + Md5Str
EncryptedChkstr := Sha1(
tokenStr + c.LoginInfo.Form.Username + tokenStr + Md5Str +