mirror of
https://github.com/filebrowser/filebrowser.git
synced 2026-01-23 02:35:10 +00:00
chore: use more standard golangci-lint options
This commit is contained in:
parent
0d973d3aad
commit
9d44932dba
8 changed files with 15 additions and 138 deletions
|
|
@ -42,7 +42,7 @@ func (s *Settings) MakeUserDir(username, userScope, serverRoot string) (string,
|
|||
func cleanUsername(s string) string {
|
||||
// Remove any trailing space to avoid ending on -
|
||||
s = strings.Trim(s, " ")
|
||||
s = strings.Replace(s, "..", "", -1)
|
||||
s = strings.ReplaceAll(s, "..", "")
|
||||
|
||||
// Replace all characters which not in the list `0-9A-Za-z@_\-.` with a dash
|
||||
s = invalidFilenameChars.ReplaceAllString(s, "-")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue