mirror of
https://github.com/mickael-kerjean/filestash
synced 2026-01-03 14:25:15 +01:00
chore (extand): additional attributes for htpasswd
This commit is contained in:
parent
30b8075308
commit
5b89af8237
1 changed files with 2 additions and 1 deletions
|
|
@ -88,7 +88,7 @@ func (this Htpasswd) Callback(formData map[string]string, idpParams map[string]s
|
|||
return nil, NewError("You haven't configured any users", 500)
|
||||
}
|
||||
lines := strings.Split(idpParams["users"], "\n")
|
||||
for _, line := range lines {
|
||||
for n, line := range lines {
|
||||
pair := strings.SplitN(line, ":", 2)
|
||||
if len(pair) != 2 {
|
||||
continue
|
||||
|
|
@ -104,6 +104,7 @@ func (this Htpasswd) Callback(formData map[string]string, idpParams map[string]s
|
|||
return map[string]string{
|
||||
"user": formData["user"],
|
||||
"password": formData["password"],
|
||||
"n": fmt.Sprintf("%d", n),
|
||||
}, nil
|
||||
}
|
||||
http.SetCookie(res, &http.Cookie{
|
||||
|
|
|
|||
Loading…
Reference in a new issue