diff options
Diffstat (limited to 'vendor/code.gitea.io/sdk/gitea/user_key.go')
-rw-r--r-- | vendor/code.gitea.io/sdk/gitea/user_key.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/vendor/code.gitea.io/sdk/gitea/user_key.go b/vendor/code.gitea.io/sdk/gitea/user_key.go index d005f00bef..02795baefc 100644 --- a/vendor/code.gitea.io/sdk/gitea/user_key.go +++ b/vendor/code.gitea.io/sdk/gitea/user_key.go @@ -31,6 +31,9 @@ type ListPublicKeysOptions struct { // ListPublicKeys list all the public keys of the user func (c *Client) ListPublicKeys(user string, opt ListPublicKeysOptions) ([]*PublicKey, *Response, error) { + if err := escapeValidatePathSegments(&user); err != nil { + return nil, nil, err + } opt.setDefaults() keys := make([]*PublicKey, 0, opt.PageSize) resp, err := c.getParsedResponse("GET", fmt.Sprintf("/users/%s/keys?%s", user, opt.getURLQuery().Encode()), nil, nil, &keys) |