- Sort Score
- Result 10 results
- Languages All
Results 1 - 8 of 8 for tarinsecurepath (0.1 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
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Mon Oct 28 14:46:33 UTC 2024 - 17.2K 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
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/reader_test.go
} func TestDisableInsecurePathCheck(t *testing.T) { t.Setenv("GODEBUG", "tarinsecurepath=1") var buf bytes.Buffer tw := NewWriter(&buf) const name = "/foo" tw.WriteHeader(&Header{ Name: name, }) tw.Close() tr := NewReader(&buf) h, err := tr.Next() if err != nil { t.Fatalf("tr.Next with tarinsecurepath=1: got err %v, want nil", err) } if h.Name != name {
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
// 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")
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Fri Sep 13 21:03:27 UTC 2024 - 24.5K bytes - Viewed (0) -
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/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 {
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Thu Jul 25 00:25:45 UTC 2024 - 55.6K 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) -
api/go1.20.txt
pkg archive/tar, var ErrInsecurePath error #55356 pkg archive/zip, var ErrInsecurePath error #55356 pkg bytes, func Clone([]uint8) []uint8 #45038 pkg bytes, func CutPrefix([]uint8, []uint8) ([]uint8, bool) #42537 pkg bytes, func CutSuffix([]uint8, []uint8) ([]uint8, bool) #42537 pkg context, func Cause(Context) error #51365 pkg context, func WithCancelCause(Context) (Context, CancelCauseFunc) #51365 pkg context, type CancelCauseFunc func(error) #51365
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Fri Feb 17 21:23:32 UTC 2023 - 602.6K bytes - Viewed (0)