You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# is it a valid domain?begindomain=Addressable::URI.parse(x)# check validityraise'Unable to parse invalid target. No hostname.'ifdomain.host.empty?# convert IDN domainx=domain.normalize.to_sifdomain.host !~ %r{^[a-zA-Z0-9\.:\/]*$}rescue=>e# if it fails it's not validx=nil# TODO: print something more usefulerror("Unable to parse invalid target #{x}: #{e}")end
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: