mirror of
				https://github.com/go-gitea/gitea
				synced 2025-10-31 19:38:23 +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