]> source.dussan.org Git - gitea.git/commit
Compare SSH_DOMAIN when parsing submodule URLs (#12753)
authormrsdizzie <info@mrsdizzie.com>
Tue, 8 Sep 2020 00:08:10 +0000 (20:08 -0400)
committerGitHub <noreply@github.com>
Tue, 8 Sep 2020 00:08:10 +0000 (20:08 -0400)
commit489c8a1478885737b8e42099fab673c6b1f3640d
tree7e246c70f0224ed9c536f38895c789adac88d1b2
parent9af60ce0bb5d6fe19cf2c3ecd37e658e8952400a
Compare SSH_DOMAIN when parsing submodule URLs (#12753)

Right now we only compare the hostname from a submodule with the prefixURL it is viewed from to check if the submodule is hosted on the same Gitea instance. This adds an additional check to compare it against SSH_DOMAIN as well since the same Gitea instance might have a different hostname for SSH and if the submodule uses that hostname we should also detect that and link to the proper DOMAIN value.

Fixes #12747, #9756
modules/git/submodule.go
modules/git/submodule_test.go
routers/repo/view.go
templates/repo/view_list.tmpl