- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for tarinsecurepath (0.23 sec)
-
doc/godebug.md
controlled by the [`tarinsecurepath` setting](/pkg/archive/tar/#Reader.Next) and the [`zipinsecurepath` setting](/pkg/archive/zip/#NewReader). These default to `tarinsecurepath=1` and `zipinsecurepath=1`, preserving the behavior of earlier versions of Go. A future version of Go may change the defaults to `tarinsecurepath=0` and `zipinsecurepath=0`. Go 1.20 introduced automatic seeding of the
Plain Text - Registered: Tue May 07 11:14:38 GMT 2024 - Last Modified: Tue Apr 16 17:29:58 GMT 2024 - 13.5K bytes - Viewed (0) -
src/archive/tar/reader.go
} hdr, err := tr.next() tr.err = err if err == nil && !filepath.IsLocal(hdr.Name) { if tarinsecurepath.Value() == "0" { tarinsecurepath.IncNonDefault() err = ErrInsecurePath } } return hdr, err } func (tr *Reader) next() (*Header, error) { var paxHdrs map[string]string var gnuLongName, gnuLongLink string // Externally, Next iterates through the tar archive as if it is a series of
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Fri Mar 08 01:59:14 GMT 2024 - 26.8K bytes - Viewed (0) -
src/archive/tar/common.go
// stored in Header will be the truncated version. var tarinsecurepath = godebug.New("tarinsecurepath") var ( ErrHeader = errors.New("archive/tar: invalid tar header") ErrWriteTooLong = errors.New("archive/tar: write too long") ErrFieldTooLong = errors.New("archive/tar: header field too long") ErrWriteAfterClose = errors.New("archive/tar: write after close") ErrInsecurePath = errors.New("archive/tar: insecure file path")
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Fri Mar 15 16:01:50 GMT 2024 - 24.7K bytes - Viewed (2) -
src/archive/zip/reader_test.go
if err != nil { t.Fatalf("Unable to write out the bugos zip entry") } r, err := OpenReader(name) if r != nil { defer r.Close() } if err != ErrInsecurePath { t.Fatalf("Error reading the archive, we expected ErrInsecurePath but got: %v", err) } _, err = r.Open("test.txt") if err != nil { t.Errorf("Error reading file: %v", err) } if len(r.File) != 1 {
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Wed Mar 27 18:23:49 GMT 2024 - 55.3K bytes - Viewed (0) -
src/archive/tar/writer_test.go
} if err := writer.Close(); err != nil { t.Fatal(err) } // Test that we can get a long name back out of the archive. reader := NewReader(&buf) hdr, err = reader.Next() if err != nil && err != ErrInsecurePath { t.Fatal(err) } if hdr.Name != longName { t.Fatal("Couldn't recover long name") } } func TestValidTypeflagWithPAXHeader(t *testing.T) { var buffer bytes.Buffer
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Tue Feb 27 16:39:23 GMT 2024 - 38.7K bytes - Viewed (0)