diff options
author | Claire <claire.github-309c@sitedethib.com> | 2022-12-07 02:35:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-07 02:35:39 +0100 |
commit | b59fb28e90bc21d6fd1a6bafd13cfbd81ab5be54 (patch) | |
tree | 0c4d4ce519dadb0ba473f73bd66206cf22407d33 /app | |
parent | 21b208afcbb5b1a6f2f49eb6db478fc9a99ad272 (diff) |
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
Diffstat (limited to 'app')
-rw-r--r-- | app/models/account_migration.rb | 2 | ||||
-rw-r--r-- | app/models/form/redirect.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/models/account_migration.rb b/app/models/account_migration.rb index 16276158d..fa8cb6013 100644 --- a/app/models/account_migration.rb +++ b/app/models/account_migration.rb @@ -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 diff --git a/app/models/form/redirect.rb b/app/models/form/redirect.rb index 795fdd057..3cd5731e6 100644 --- a/app/models/form/redirect.rb +++ b/app/models/form/redirect.rb @@ -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 |