mirror of https://github.com/go-gitea/gitea.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
93ab90743d
If the context is cancelled `.NotificationUnreadCount` in a template can cause an infinite loop with `ctx.ServerError()` being called, which creates a template that then calls `.NotificationUnreadCount` calling `GetNotificationCount()` with the cancelled context resulting in an error that calls `ctx.ServerError`... and so on... This PR simply stops calling `ctx.ServerError` in the error handler code for `.NotificationUnreadCount` as we have already started rendering and so it is too late to call `ctx.ServerError`. Additionally we skip logging the error if it's a context cancelled error. Fix #19793 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io> |
3 years ago | |
---|---|---|
.. | ||
admin | 3 years ago | |
auth | 3 years ago | |
dev | 3 years ago | |
events | 3 years ago | |
explore | 3 years ago | |
feed | 3 years ago | |
healthcheck | 3 years ago | |
misc | 3 years ago | |
org | 3 years ago | |
repo | 3 years ago | |
user | 3 years ago | |
auth.go | 3 years ago | |
auth_windows.go | 3 years ago | |
base.go | 3 years ago | |
goget.go | 3 years ago | |
home.go | 3 years ago | |
metrics.go | 3 years ago | |
nodeinfo.go | 3 years ago | |
swagger_json.go | 4 years ago | |
web.go | 3 years ago | |
webfinger.go | 3 years ago |