Template
1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo synced 2024-11-28 12:46:09 +01:00

#1635 PAM return error bug

This commit is contained in:
Unknwon 2015-09-14 11:03:42 -04:00
parent 2d1bb0cf49
commit d600530c20
3 changed files with 3 additions and 3 deletions

View file

@ -17,7 +17,7 @@ import (
"github.com/gogits/gogs/modules/setting"
)
const APP_VER = "0.6.12.0913 Beta"
const APP_VER = "0.6.12.0914 Beta"
func init() {
runtime.GOMAXPROCS(runtime.NumCPU())

View file

@ -388,7 +388,7 @@ func LoginUserSMTPSource(u *User, name, passwd string, sourceId int64, cfg *SMTP
func LoginUserPAMSource(u *User, name, passwd string, sourceId int64, cfg *PAMConfig, autoRegister bool) (*User, error) {
if err := pam.PAMAuth(cfg.ServiceName, name, passwd); err != nil {
if strings.Contains(err.Error(), "Authentication failure") {
return nil, ErrUserNotExist{u.Id, u.Name}
return nil, ErrUserNotExist{0, name}
}
return nil, err
}

View file

@ -1 +1 @@
0.6.12.0913 Beta
0.6.12.0914 Beta