mirror of
https://github.com/drakkan/sftpgo.git
synced 2026-03-14 14:25:52 +01:00
clean home dir after applying group replacement
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
parent
f90fbccb2c
commit
e861f0f578
1 changed files with 2 additions and 1 deletions
|
|
@ -22,6 +22,7 @@ import (
|
|||
"net"
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"slices"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
|
@ -1587,7 +1588,7 @@ func (u *User) mergeCryptFsConfig(group *Group) {
|
|||
|
||||
func (u *User) mergeWithPrimaryGroup(group *Group, replacer *strings.Replacer) {
|
||||
if group.UserSettings.HomeDir != "" {
|
||||
u.HomeDir = u.replacePlaceholder(group.UserSettings.HomeDir, replacer)
|
||||
u.HomeDir = filepath.Clean(u.replacePlaceholder(group.UserSettings.HomeDir, replacer))
|
||||
}
|
||||
if group.UserSettings.FsConfig.Provider != 0 {
|
||||
u.FsConfig = u.replaceFsConfigPlaceholders(group.UserSettings.FsConfig, replacer)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue