Add missing blob in MarkupContext (#91)
Some checks failed
testing-integration / test-unit (push) Has been skipped
/ build-oci-image (rootful) (push) Failing after 1m42s
/ build-oci-image (rootless) (push) Failing after 7s
testing-integration / test-sqlite (push) Has been skipped
testing / backend-checks (push) Successful in 24m43s
testing / frontend-checks (push) Successful in 2m58s
testing / test-unit (push) Has been skipped
testing / test-e2e (push) Has been skipped
testing / test-mysql (push) Failing after 17s
testing / test-pgsql (push) Failing after 28s
testing / test-sqlite (push) Successful in 1h14m9s
testing / security-check (push) Has been skipped
testing / test-remote-cacher (redis) (push) Has been skipped
testing / test-remote-cacher (valkey) (push) Has been skipped
testing / test-remote-cacher (garnet) (push) Has been skipped
testing / test-remote-cacher (redict) (push) Has been skipped
Integration tests for the release process / release-simulation (push) Has been cancelled
/ release (push) Has been cancelled

This fixes a 500 in the /<owner>/<repository>/render/... endpoints that
happens due to a nil pointer dereference of the blob.

Reviewed-on: https://codeberg.org/forgejo-aneksajo/forgejo-aneksajo/pulls/91
Co-authored-by: Matthias Riße <m.risse@fz-juelich.de>
Co-committed-by: Matthias Riße <m.risse@fz-juelich.de>
This commit is contained in:
Matthias Riße 2025-09-20 18:04:32 +02:00
parent 8767d64276
commit 6f0b449a05

View file

@ -67,6 +67,7 @@ func RenderFile(ctx *context.Context) {
Metas: ctx.Repo.Repository.ComposeDocumentMetas(ctx),
GitRepo: ctx.Repo.GitRepo,
InStandalonePage: true,
Blob: blob,
}, rd, ctx.Resp)
if err != nil {
log.Error("Failed to render file %q: %v", ctx.Repo.TreePath, err)