fix: disallow file name too long when writing a file (#4881)
* fix: disallow file name too long when writing a file * bool LongerName to MaxFilenameLength --------- Co-authored-by: Konstantin Lebedev <9497591+kmlebedev@users.noreply.github.co>
This commit is contained in:
committed by
GitHub
parent
edee91ef0e
commit
1cac5d983d
@@ -90,7 +90,7 @@ func (fs *FilerServer) encrypt(ctx context.Context, w http.ResponseWriter, r *ht
|
||||
Size: int64(pu.OriginalDataSize),
|
||||
}
|
||||
|
||||
if dbErr := fs.filer.CreateEntry(ctx, entry, false, false, nil, false); dbErr != nil {
|
||||
if dbErr := fs.filer.CreateEntry(ctx, entry, false, false, nil, false, so.MaxFileNameLength); dbErr != nil {
|
||||
fs.filer.DeleteChunks(entry.GetChunks())
|
||||
err = dbErr
|
||||
filerResult.Error = dbErr.Error()
|
||||
|
||||
Reference in New Issue
Block a user