Fix 500 error when trying to migrate to an invalid address (#21462)
* Fix 500 error when trying to migrate to an invalid address * Add tests
This commit is contained in:
		| @@ -59,7 +59,7 @@ class AccountMigration < ApplicationRecord | ||||
|  | ||||
|   def set_target_account | ||||
|     self.target_account = ResolveAccountService.new.call(acct, skip_cache: true) | ||||
|   rescue Webfinger::Error, HTTP::Error, OpenSSL::SSL::SSLError, Mastodon::Error | ||||
|   rescue Webfinger::Error, HTTP::Error, OpenSSL::SSL::SSLError, Mastodon::Error, Addressable::URI::InvalidURIError | ||||
|     # Validation will take care of it | ||||
|   end | ||||
|  | ||||
|   | ||||
| @@ -32,7 +32,7 @@ class Form::Redirect | ||||
|  | ||||
|   def set_target_account | ||||
|     @target_account = ResolveAccountService.new.call(acct, skip_cache: true) | ||||
|   rescue Webfinger::Error, HTTP::Error, OpenSSL::SSL::SSLError, Mastodon::Error | ||||
|   rescue Webfinger::Error, HTTP::Error, OpenSSL::SSL::SSLError, Mastodon::Error, Addressable::URI::InvalidURIError | ||||
|     # Validation will take care of it | ||||
|   end | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user