- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for ErrInsecurePath (0.15 sec)
-
src/archive/zip/reader.go
// and the GODEBUG environment variable contains `zipinsecurepath=0`, // OpenReader returns the reader with an ErrInsecurePath error. // A future version of Go may introduce this behavior by default. // Programs that want to accept non-local names can ignore // the ErrInsecurePath error and use the returned reader. func OpenReader(name string) (*ReadCloser, error) { f, err := os.Open(name) if err != nil {
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Sat Aug 03 01:05:29 UTC 2024 - 28.1K bytes - Viewed (0) -
src/archive/tar/reader.go
// and the GODEBUG environment variable contains `tarinsecurepath=0`, // Next returns the header with an [ErrInsecurePath] error. // A future version of Go may introduce this behavior by default. // Programs that want to accept non-local names can ignore // the [ErrInsecurePath] error and use the returned header. func (tr *Reader) Next() (*Header, error) { if tr.err != nil { return nil, tr.err }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Fri Mar 08 01:59:14 UTC 2024 - 26.8K 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
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Mon Sep 23 14:32:33 UTC 2024 - 39.4K bytes - Viewed (0) -
src/archive/tar/reader_test.go
const securePath = "secure" tw.WriteHeader(&Header{ Name: securePath, }) tw.Close() tr := NewReader(&buf) h, err := tr.Next() if err != ErrInsecurePath { t.Errorf("tr.Next for file %q: got err %v, want ErrInsecurePath", path, err) continue } if h.Name != path { t.Errorf("tr.Next for file %q: got name %q, want %q", path, h.Name, path) } // Error should not be sticky.
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Thu Oct 03 15:48:09 UTC 2024 - 46.9K bytes - Viewed (0) -
src/archive/tar/common.go
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") errMissData = errors.New("archive/tar: sparse file references non-existent data") errUnrefData = errors.New("archive/tar: sparse file contains unreferenced data")
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Fri Sep 13 21:03:27 UTC 2024 - 24.5K bytes - Viewed (0)