mirror of
https://github.com/go-gitea/gitea
synced 2025-07-15 23:17:19 +00:00
Fix nil pointer panic when exec some gitea cli command (#28791)
panic:  After: 
This commit is contained in:
@@ -27,5 +27,8 @@ func AuthorizedPublicKeyByContent(ctx context.Context, content string) (string,
|
||||
req := newInternalRequest(ctx, reqURL, "POST")
|
||||
req.Param("content", content)
|
||||
resp, extra := requestJSONResp(req, &responseText{})
|
||||
if resp == nil {
|
||||
return "", extra
|
||||
}
|
||||
return resp.Text, extra
|
||||
}
|
||||
|
Reference in New Issue
Block a user