]> source.dussan.org Git - gitea.git/commitdiff
Add missing return to handleSettingRemoteAddrError (#16794)
authorzeripath <art27@cantab.net>
Mon, 23 Aug 2021 22:09:25 +0000 (23:09 +0100)
committerGitHub <noreply@github.com>
Mon, 23 Aug 2021 22:09:25 +0000 (18:09 -0400)
There is a missing return in handleSettingRemoteAddrError which means
that the error page for repo settings is duplicately rendered.

Fix #16771

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
routers/web/repo/setting.go

index 20253a7cae0a4584a738c19fdc5ec8c3eddb5d94..136e08cb4702e71033b99f2cedd164eb42637462 100644 (file)
@@ -742,6 +742,7 @@ func handleSettingRemoteAddrError(ctx *context.Context, err error, form *forms.R
                default:
                        ctx.ServerError("Unknown error", err)
                }
+               return
        }
        ctx.RenderWithErr(ctx.Tr("repo.mirror_address_url_invalid"), tplSettingsOptions, form)
 }