Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for ErrInsecurePath (0.19 sec)

  1. 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: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 08 01:59:14 UTC 2024
    - 26.8K bytes
    - Viewed (0)
  2. 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: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 38.7K bytes
    - Viewed (0)
  3. 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: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 21 21:14:38 UTC 2022
    - 47.1K bytes
    - Viewed (0)
  4. 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: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 15 16:01:50 UTC 2024
    - 24.7K bytes
    - Viewed (0)
  5. src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go

    		{"(*Writer).Flush", Method, 0},
    		{"(*Writer).Write", Method, 0},
    		{"(*Writer).WriteHeader", Method, 0},
    		{"(Format).String", Method, 10},
    		{"ErrFieldTooLong", Var, 0},
    		{"ErrHeader", Var, 0},
    		{"ErrInsecurePath", Var, 20},
    		{"ErrWriteAfterClose", Var, 0},
    		{"ErrWriteTooLong", Var, 0},
    		{"FileInfoHeader", Func, 1},
    		{"Format", Type, 10},
    		{"FormatGNU", Const, 10},
    		{"FormatPAX", Const, 10},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 534.2K bytes
    - Viewed (0)
  6. 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: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 17 21:23:32 UTC 2023
    - 602.6K bytes
    - Viewed (0)
Back to top