mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-08 07:10:56 +03:00
improve validations for user provided file and directory paths
This commit is contained in:
@@ -149,7 +149,7 @@ func getCustomServeFlags() []string {
|
||||
result = append(result, "--"+configFileFlag)
|
||||
result = append(result, configFile)
|
||||
}
|
||||
if logFilePath != defaultLogFile && len(logFilePath) > 0 && logFilePath != "." {
|
||||
if logFilePath != defaultLogFile && utils.IsFileInputValid(logFilePath) {
|
||||
if !filepath.IsAbs(logFilePath) {
|
||||
logFilePath = filepath.Join(configDir, logFilePath)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user