]> source.dussan.org Git - gitea.git/commitdiff
Add missing return to handleSettingRemoteAddrError (#16794) (#16795)
authorzeripath <art27@cantab.net>
Mon, 23 Aug 2021 22:09:28 +0000 (23:09 +0100)
committerGitHub <noreply@github.com>
Mon, 23 Aug 2021 22:09:28 +0000 (18:09 -0400)
Backport #16794

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 0a84f15bf0bff8e59f655c0686c23a978dfa6d63..38d551de92ade006fd3c228ad9af2986128c6d35 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)
 }