(t *testing.T)
| 1736 | } |
| 1737 | |
| 1738 | func 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 | |
| 1748 | func TestNewUploadRequest_pathTraversal(t *testing.T) { |
| 1749 | t.Parallel() |
nothing calls this directly
no test coverage detected
searching dependent graphs…