aboutsummaryrefslogtreecommitdiff
path: root/internal/form/repo.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/form/repo.go')
-rw-r--r--internal/form/repo.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/form/repo.go b/internal/form/repo.go
index bc0dc426..adcbc66a 100644
--- a/internal/form/repo.go
+++ b/internal/form/repo.go
@@ -12,6 +12,7 @@ import (
"github.com/unknwon/com"
"gopkg.in/macaron.v1"
+ "gogs.io/gogs/internal/conf"
"gogs.io/gogs/internal/db"
"gogs.io/gogs/internal/netutil"
)
@@ -71,7 +72,7 @@ func (f MigrateRepo) ParseRemoteAddr(user *db.User) (string, error) {
return "", db.ErrInvalidCloneAddr{IsURLError: true}
}
- if netutil.IsLocalHostname(u.Hostname()) {
+ if netutil.IsLocalHostname(u.Hostname(), conf.Security.LocalNetworkAllowlist) {
return "", db.ErrInvalidCloneAddr{IsURLError: true}
}