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

Function TestNewFormRequest_pathTraversal

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

Source from the content-addressed store, hash-verified

1736}
1737
1738func TestNewFormRequest_pathTraversal(t *testing.T) {
1739 t.Parallel()
1740 c := mustNewClient(t)
1741
1742 _, err := c.NewFormRequest(t.Context(), "repos/x/../../../admin", nil)
1743 if !errors.Is(err, ErrPathForbidden) {
1744 t.Fatalf("NewFormRequest with path traversal: want ErrPathForbidden, got %v", err)
1745 }
1746}
1747
1748func TestNewUploadRequest_pathTraversal(t *testing.T) {
1749 t.Parallel()

Callers

nothing calls this directly

Calls 3

mustNewClientFunction · 0.85
NewFormRequestMethod · 0.80
IsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…