mirror of
https://github.com/schollz/croc.git
synced 2025-10-11 05:11:06 +02:00
croc checks for error in file name
This commit is contained in:
parent
3e804a4a09
commit
7c3dc4453a
1 changed files with 3 additions and 2 deletions
|
@ -1210,8 +1210,9 @@ func (c *Client) processMessageFileInfo(m message.Message) (done bool, err error
|
|||
return true, fmt.Errorf("invalid path detected: '%s'", fi.FolderRemote)
|
||||
}
|
||||
// Issue #595 - disallow filenames with invisible characters
|
||||
if !utils.ValidFileName(path.Join(c.FilesToTransfer[i].FolderRemote, fi.Name)) {
|
||||
return true, fmt.Errorf("invalid filename detected: '%s'", fi.Name)
|
||||
errFileName := utils.ValidFileName(path.Join(c.FilesToTransfer[i].FolderRemote, fi.Name))
|
||||
if errFileName != nil {
|
||||
return true, errFileName
|
||||
}
|
||||
}
|
||||
c.TotalNumberOfContents = 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue