mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 14:50:55 +03:00
log file: if the path is not absolute make it relative to config dir
Also refuse to join invalid file name such as "." Fixes #85
This commit is contained in:
@@ -129,7 +129,7 @@ func ReloadTLSCertificate() {
|
||||
}
|
||||
|
||||
func getConfigPath(name, configDir string) string {
|
||||
if len(name) > 0 && !filepath.IsAbs(name) {
|
||||
if len(name) > 0 && !filepath.IsAbs(name) && name != "." {
|
||||
return filepath.Join(configDir, name)
|
||||
}
|
||||
return name
|
||||
|
||||
Reference in New Issue
Block a user