Prevent template renderer from rendering error (#14646)

When there is a panic during template rendering unrolled/render
will automatically render the error. This leads to the
panic being displayed in the page and not a 500 page

Fix #14467
Fix #14525

Signed-off-by: Andrew Thornton <art27@cantab.net>
tokarchuk/v1.17
zeripath 4 years ago committed by GitHub
parent b3c2e23cbb
commit c9f1baf620
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      modules/templates/base.go

@ -92,5 +92,6 @@ func HTMLRenderer() *render.Render {
Asset: GetAsset, Asset: GetAsset,
AssetNames: GetAssetNames, AssetNames: GetAssetNames,
IsDevelopment: !setting.IsProd(), IsDevelopment: !setting.IsProd(),
DisableHTTPErrorRendering: true,
}) })
} }

Loading…
Cancel
Save