mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-09 16:25:15 +03:00
Improve checking for the create_dirs permission
Do not allow implicit directory creation on file uploads if create_dirs permission is not granted Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -330,7 +330,7 @@ func (fs *HTTPFs) Open(name string, offset int64) (File, *pipeat.PipeReaderAt, f
|
||||
}
|
||||
|
||||
// Create creates or opens the named file for writing
|
||||
func (fs *HTTPFs) Create(name string, flag int) (File, *PipeWriter, func(), error) {
|
||||
func (fs *HTTPFs) Create(name string, flag, _ int) (File, *PipeWriter, func(), error) {
|
||||
r, w, err := pipeat.PipeInDir(fs.localTempDir)
|
||||
if err != nil {
|
||||
return nil, nil, nil, err
|
||||
|
||||
Reference in New Issue
Block a user