mirror of
https://github.com/filebrowser/filebrowser.git
synced 2026-07-17 16:36:49 +00:00
fix: self-registered users don't get execute perms
This commit is contained in:
parent
2368e468b9
commit
b6a4fb1f27
1 changed files with 6 additions and 0 deletions
|
|
@ -171,6 +171,12 @@ var signupHandler = func(_ http.ResponseWriter, r *http.Request, d *data) (int,
|
|||
// if that is the default permission.
|
||||
user.Perm.Admin = false
|
||||
|
||||
// Self-registered users should not inherit execution capabilities from
|
||||
// default settings, regardless of what the administrator has configured
|
||||
// as the default. Execution rights must be explicitly granted by an admin.
|
||||
user.Perm.Execute = false
|
||||
user.Commands = []string{}
|
||||
|
||||
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