aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/code.gitea.io/sdk/gitea/git_blob.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/code.gitea.io/sdk/gitea/git_blob.go')
-rw-r--r--vendor/code.gitea.io/sdk/gitea/git_blob.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/vendor/code.gitea.io/sdk/gitea/git_blob.go b/vendor/code.gitea.io/sdk/gitea/git_blob.go
index 262fd92dfd..7668672dc0 100644
--- a/vendor/code.gitea.io/sdk/gitea/git_blob.go
+++ b/vendor/code.gitea.io/sdk/gitea/git_blob.go
@@ -19,6 +19,9 @@ type GitBlobResponse struct {
// GetBlob get the blob of a repository file
func (c *Client) GetBlob(user, repo, sha string) (*GitBlobResponse, *Response, error) {
+ if err := escapeValidatePathSegments(&user, &repo, &sha); err != nil {
+ return nil, nil, err
+ }
blob := new(GitBlobResponse)
resp, err := c.getParsedResponse("GET", fmt.Sprintf("/repos/%s/%s/git/blobs/%s", user, repo, sha), nil, nil, blob)
return blob, resp, err