Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mastodon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pierre Boudes
mastodon
Commits
dc5c86ad
Unverified
Commit
dc5c86ad
authored
2 years ago
by
Eugen Rochko
Committed by
GitHub
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix account migration form ever using outdated account data (#18429)
parent
317ec06d
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/models/form/redirect.rb
+1
-1
1 addition, 1 deletion
app/models/form/redirect.rb
app/services/resolve_account_service.rb
+2
-1
2 additions, 1 deletion
app/services/resolve_account_service.rb
with
3 additions
and
2 deletions
app/models/form/redirect.rb
+
1
−
1
View file @
dc5c86ad
...
...
@@ -31,7 +31,7 @@ class Form::Redirect
private
def
set_target_account
@target_account
=
ResolveAccountService
.
new
.
call
(
acct
)
@target_account
=
ResolveAccountService
.
new
.
call
(
acct
,
skip_cache:
true
)
rescue
Webfinger
::
Error
,
HTTP
::
Error
,
OpenSSL
::
SSL
::
SSLError
,
Mastodon
::
Error
# Validation will take care of it
end
...
...
This diff is collapsed.
Click to expand it.
app/services/resolve_account_service.rb
+
2
−
1
View file @
dc5c86ad
...
...
@@ -12,6 +12,7 @@ class ResolveAccountService < BaseService
# @param [Hash] options
# @option options [Boolean] :redirected Do not follow further Webfinger redirects
# @option options [Boolean] :skip_webfinger Do not attempt any webfinger query or refreshing account data
# @option options [Boolean] :skip_cache Get the latest data from origin even if cache is not due to update yet
# @option options [Boolean] :suppress_errors When failing, return nil instead of raising an error
# @return [Account]
def
call
(
uri
,
options
=
{})
...
...
@@ -120,7 +121,7 @@ class ResolveAccountService < BaseService
return
false
if
@options
[
:check_delivery_availability
]
&&
!
DeliveryFailureTracker
.
available?
(
@domain
)
return
false
if
@options
[
:skip_webfinger
]
@account
.
nil?
||
@account
.
possibly_stale?
@options
[
:skip_cache
]
||
@account
.
nil?
||
@account
.
possibly_stale?
end
def
activitypub_ready?
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment