diff --git a/context.go b/context.go index 66917d79..859bc576 100644 --- a/context.go +++ b/context.go @@ -787,7 +787,6 @@ func (c *Context) saveUploadedFile( _, err = io.Copy(out, src) return err - } // Bind checks the Method and Content-Type to select a binding engine automatically, diff --git a/context_test.go b/context_test.go index 536e79f3..9b70e69e 100644 --- a/context_test.go +++ b/context_test.go @@ -334,10 +334,10 @@ func TestSaveUploadedFileToRootRejectsPathTraversal(t *testing.T) { err = c.SaveUploadedFileToRoot(f, "../escape.txt", root) require.Error(t, err) - assert.ErrorContains(t, err, "path escapes") + require.ErrorContains(t, err, "path escapes") _, err = os.Stat(filepath.Join(baseDir, "escape.txt")) - assert.ErrorIs(t, err, os.ErrNotExist) + require.ErrorIs(t, err, os.ErrNotExist) } func TestSaveUploadedFileToRootRejectsSymlinkEscape(t *testing.T) { @@ -375,7 +375,7 @@ func TestSaveUploadedFileToRootRejectsSymlinkEscape(t *testing.T) { require.Error(t, err) _, err = os.Stat(filepath.Join(outsideDir, "escape.txt")) - assert.ErrorIs(t, err, os.ErrNotExist) + require.ErrorIs(t, err, os.ErrNotExist) } func TestContextReset(t *testing.T) {