From b3bb6f99df6ef507320934a570d2720a72f93548 Mon Sep 17 00:00:00 2001 From: Code by Ben Date: Fri, 6 Dec 2024 17:21:49 +1100 Subject: [PATCH] clearing data on artifact. --- handler/app/dirs.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/handler/app/dirs.go b/handler/app/dirs.go index 3943b2d0..2fccf453 100644 --- a/handler/app/dirs.go +++ b/handler/app/dirs.go @@ -113,13 +113,16 @@ func (dir Dirs) Artifact(c echo.Context, db *sql.DB, logger *zap.SugaredLogger, if filerecord.EmbedReadme(art) { data, err = dir.embed(art, data) if err != nil { + clear(data) logger.Error(errorWithID(err, dir.URI, art.ID)) } } err = c.Render(http.StatusOK, name, data) if err != nil { + clear(data) return InternalErr(c, name, errorWithID(err, dir.URI, art.ID)) } + clear(data) return nil }