mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-08-24 17:41:29 +08:00
ignore DNS error when doing migration allow/block check (#19567)
Co-authored-by: Lauris BH <lauris@nix.lv>
This commit is contained in:
@ -332,7 +332,6 @@ type ErrInvalidCloneAddr struct {
|
||||
IsProtocolInvalid bool
|
||||
IsPermissionDenied bool
|
||||
LocalPath bool
|
||||
NotResolvedIP bool
|
||||
}
|
||||
|
||||
// IsErrInvalidCloneAddr checks if an error is a ErrInvalidCloneAddr.
|
||||
@ -342,9 +341,6 @@ func IsErrInvalidCloneAddr(err error) bool {
|
||||
}
|
||||
|
||||
func (err *ErrInvalidCloneAddr) Error() string {
|
||||
if err.NotResolvedIP {
|
||||
return fmt.Sprintf("migration/cloning from '%s' is not allowed: unknown hostname", err.Host)
|
||||
}
|
||||
if err.IsInvalidPath {
|
||||
return fmt.Sprintf("migration/cloning from '%s' is not allowed: the provided path is invalid", err.Host)
|
||||
}
|
||||
|
Reference in New Issue
Block a user