mirror of
https://github.com/go-gitea/gitea.git
synced 2024-05-11 05:55:29 +00:00
ignore DNS error when doing migration allow/block check (#19566)
Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
@ -81,10 +81,9 @@ func IsMigrateURLAllowed(remoteURL string, doer *user_model.User) error {
|
||||
err = nil //nolint
|
||||
hostName = u.Host
|
||||
}
|
||||
addrList, err := net.LookupIP(hostName)
|
||||
if err != nil {
|
||||
return &models.ErrInvalidCloneAddr{Host: u.Host, NotResolvedIP: true}
|
||||
}
|
||||
|
||||
// some users only use proxy, there is no DNS resolver. it's safe to ignore the LookupIP error
|
||||
addrList, _ := net.LookupIP(hostName)
|
||||
|
||||
var ipAllowed bool
|
||||
var ipBlocked bool
|
||||
|
Reference in New Issue
Block a user