Skip to content

Commit

Permalink
Return 404 instead of 403 if user can not access the repo (go-gitea#2…
Browse files Browse the repository at this point in the history
  • Loading branch information
2 people authored and yardenshoham committed Feb 26, 2023
1 parent 27879bc commit 2779176
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion routers/web/repo/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ func httpBase(ctx *context.Context) (h *serviceHandler) {
}

if !p.CanAccess(accessMode, unitType) {
ctx.PlainText(http.StatusForbidden, "User permission denied")
ctx.PlainText(http.StatusNotFound, "Repository not found")
return
}
}
Expand Down

0 comments on commit 2779176

Please sign in to comment.