mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-20 20:07:03 +01:00
fix pam authorization (#19040)
https://huntr.dev/bounties/8d221f92-b2b1-4878-bc31-66ff272e5ceb/ Co-authored-by: ysf <34326+ysf@users.noreply.github.com>
This commit is contained in:
parent
7443213707
commit
1314f38b59
1 changed files with 4 additions and 0 deletions
|
@ -35,6 +35,10 @@ func Auth(serviceName, userName, passwd string) (string, error) {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if err = t.AcctMgmt(0); err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
|
||||||
// PAM login names might suffer transformations in the PAM stack.
|
// PAM login names might suffer transformations in the PAM stack.
|
||||||
// We should take whatever the PAM stack returns for it.
|
// We should take whatever the PAM stack returns for it.
|
||||||
return t.GetItem(pam.User)
|
return t.GetItem(pam.User)
|
||||||
|
|
Loading…
Reference in a new issue