@@ -707,7 +707,9 @@ func TestUnzipSymlinkEscape(t *testing.T) {
707707 dstPath := filepath .Join (tempDir , "dst" )
708708
709709 // Create symlink pointing outside destination with ..
710- zipData := createZipArchiveWithSymlink (t , "target.txt" , []byte ("target content" ), "evil_link.txt" , "../../../etc/passwd" )
710+ zipData := createZipArchiveWithSymlink (
711+ t , "target.txt" , []byte ("target content" ), "evil_link.txt" , "../../../etc/passwd" ,
712+ )
711713 require .NoError (t , vfs .WriteFile (fs , zipPath , zipData , 0644 ))
712714
713715 err := vfs .NewZipDecompressor ().Unzip (l , fs , dstPath , zipPath , 0 )
@@ -1059,7 +1061,9 @@ func createZipArchiveWithMode(t *testing.T, name string, content []byte, mode os
10591061}
10601062
10611063// createZipArchiveWithSymlink creates a zip archive with a regular file and a symlink to it.
1062- func createZipArchiveWithSymlink (t * testing.T , targetName string , targetContent []byte , linkName , linkTarget string ) []byte {
1064+ func createZipArchiveWithSymlink (
1065+ t * testing.T , targetName string , targetContent []byte , linkName , linkTarget string ,
1066+ ) []byte {
10631067 t .Helper ()
10641068
10651069 var buf bytes.Buffer
0 commit comments