1
0
Fork 0
forked from forgejo/forgejo

Cleanup, handle invalid usernames for ActivityPub person GET request

Signed-off-by: Anthony Wang <ta180m@pm.me>
This commit is contained in:
Anthony Wang 2022-03-24 18:44:44 -05:00
parent ebef769703
commit 46973f99fa
No known key found for this signature in database
GPG key ID: BC96B00AEC5F2D76
3 changed files with 6 additions and 4 deletions

View file

@ -35,6 +35,9 @@ func Person(ctx *context.APIContext) {
// "$ref": "#/responses/ActivityPub"
user := user.GetUserByParamsName(ctx, "username")
if user == nil {
return
}
username := ctx.Params("username")
person := streams.NewActivityStreamsPerson()