diff options
Diffstat (limited to 'routes/repo/branch.go')
-rw-r--r-- | routes/repo/branch.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/routes/repo/branch.go b/routes/repo/branch.go index 432ebe86..e24df65a 100644 --- a/routes/repo/branch.go +++ b/routes/repo/branch.go @@ -14,6 +14,7 @@ import ( "github.com/gogs/gogs/models" "github.com/gogs/gogs/pkg/context" + "github.com/gogs/gogs/pkg/tool" ) const ( @@ -112,7 +113,7 @@ func DeleteBranchPost(c *context.Context) { defer func() { redirectTo := c.Query("redirect_to") - if len(redirectTo) == 0 { + if !tool.IsSameSiteURLPath(redirectTo) { redirectTo = c.Repo.RepoLink } c.Redirect(redirectTo) |