MCPcopy Index your code
hub / github.com/google/go-github / TestNewUploadRequest_pathTraversal

Function TestNewUploadRequest_pathTraversal

github/github_test.go:1748–1756  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1746}
1747
1748func TestNewUploadRequest_pathTraversal(t *testing.T) {
1749 t.Parallel()
1750 c := mustNewClient(t)
1751
1752 _, err := c.NewUploadRequest(t.Context(), "repos/x/../../../admin", nil, 0, "")
1753 if !errors.Is(err, ErrPathForbidden) {
1754 t.Fatalf("NewUploadRequest with path traversal: want ErrPathForbidden, got %v", err)
1755 }
1756}
1757
1758func TestNewFormRequest(t *testing.T) {
1759 t.Parallel()

Callers

nothing calls this directly

Calls 3

mustNewClientFunction · 0.85
NewUploadRequestMethod · 0.80
IsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…