forgejo/modules
6543 780b198997
Prevent context deadline error propagation in GetCommitsInfo (#20346) (#20361)
Backport #20346

Although `WalkGitLog` tries to test for `context.DeadlineExceededErr`
there is a small chance that the error will propagate to the reader
before it is recognised. This will cause the error to propagate up to
`renderDirectoryFiles` and cause a http status 500.

Here we check that the error passed is a `DeadlineExceededErr` via error.Is

Fix #20329

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: zeripath <art27@cantab.net>
2022-07-14 03:44:34 +01:00
..
activitypub
analyze
appstate
auth
avatar
base
cache
charset
container
context Respond with a 401 on git push when password isn't changed yet (#20027) 2022-06-19 20:02:18 +03:00
convert Move issues related files into models/issues (#19931) 2022-06-13 17:37:59 +08:00
csv Allow render HTML with css/js external links (#19017) 2022-06-16 11:33:23 +08:00
doctor Backtick table name in generic orphan check (#20019) (#20037) 2022-06-19 19:41:12 +01:00
emoji
eventsource Stop spurious APIFormat stopwatches logs (#20008) 2022-06-17 22:47:15 +01:00
generate
git Prevent context deadline error propagation in GetCommitsInfo (#20346) (#20361) 2022-07-14 03:44:34 +01:00
gitgraph Move some code into models/git (#19879) 2022-06-12 23:51:54 +08:00
graceful
hcaptcha
highlight
hostmatcher
httpcache
httplib
indexer Fix `dump-repo` git init, fix wrong error type for NullDownloader (#20182) (#20186) 2022-07-01 18:01:05 +02:00
json
lfs Move some code into models/git (#19879) 2022-06-12 23:51:54 +08:00
log Empty log queue on flush and close (#19994) 2022-06-18 10:33:13 +08:00
markup Fix NPE when using non-numeric (#20277) (#20278) 2022-07-07 20:56:50 +08:00
metrics
migration Fix `dump-repo` git init, fix wrong error type for NullDownloader (#20182) (#20186) 2022-07-01 18:01:05 +02:00
nosql
notification Move issues related files into models/issues (#19931) 2022-06-13 17:37:59 +08:00
options
packages
paginator
password
pprof
private
process
proxy
public
queue
recaptcha
references
regexplru
repository Remove legacy git code (ver < 2.0), fine tune markup tests (#19930) 2022-06-16 23:47:44 +08:00
secret
session
setting Refactor SSH init code, fix directory creation for TrustedUserCAKeys file (#20299) (#20306) 2022-07-11 23:27:51 +08:00
ssh Refactor SSH init code, fix directory creation for TrustedUserCAKeys file (#20299) (#20306) 2022-07-11 23:27:51 +08:00
storage
structs
svg
sync
templates fix push mirrors URL are no longer displayed on the UI (#20011) 2022-06-18 11:30:26 +08:00
test
timeutil
translation
typesniffer
updatechecker
upload
uri
user
util
validation
web