V2.8.1
修复几处bug
This commit is contained in:
@@ -67,8 +67,7 @@ func (self *BaseController) Auth() {
|
||||
if userId > 0 {
|
||||
user, err := models.AdminGetById(userId)
|
||||
|
||||
//if err == nil && password == libs.Md5([]byte(self.getClientIp()+"|"+user.Password+user.Salt)) {
|
||||
if err == nil && password == libs.Md5([]byte(user.Password+user.Salt)){
|
||||
if err == nil && password == libs.Md5([]byte(self.getClientIp()+"|"+user.Password+user.Salt)) {
|
||||
self.userId = user.Id
|
||||
self.loginName = user.LoginName
|
||||
self.userName = user.RealName
|
||||
@@ -78,7 +77,7 @@ func (self *BaseController) Auth() {
|
||||
}
|
||||
|
||||
isHasAuth := strings.Contains(self.allowUrl, self.controllerName+"/"+self.actionName)
|
||||
noAuth := "ajaxsave/table/loginin/loginout/getnodes/start/apitask/apistart/apipause"
|
||||
noAuth := "ajaxsave/table/loginin/loginout/getnodes/start/apitask/apistart/apipause"
|
||||
isNoAuth := strings.Contains(noAuth, self.actionName)
|
||||
|
||||
if isHasAuth == false && isNoAuth == false {
|
||||
|
||||
Reference in New Issue
Block a user