Skip to content

Commit

Permalink
Return 404 instead of 403 if user can not access the repo (#23155)
Browse files Browse the repository at this point in the history
  • Loading branch information
yp05327 and lunny authored Feb 26, 2023
1 parent 3570422 commit f1bde2f
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 f1bde2f

Please sign in to comment.