mirror of
https://github.com/filebrowser/filebrowser.git
synced 2026-07-17 16:36:49 +00:00
fix: signup handler shouldn't create admins
This commit is contained in:
parent
4bd7d69c82
commit
a63573b67e
1 changed files with 4 additions and 0 deletions
|
|
@ -167,6 +167,10 @@ var signupHandler = func(_ http.ResponseWriter, r *http.Request, d *data) (int,
|
|||
|
||||
d.settings.Defaults.Apply(user)
|
||||
|
||||
// Users signed up via the signup handler should never become admins, even
|
||||
// if that is the default permission.
|
||||
user.Perm.Admin = false
|
||||
|
||||
pwd, err := users.ValidateAndHashPwd(info.Password, d.settings.MinimumPasswordLength)
|
||||
if err != nil {
|
||||
return http.StatusBadRequest, err
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue