about summary refs log tree commit diff
path: root/app/controllers/activitypub/followers_synchronizations_controller.rb
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2021-09-19 14:10:26 +0200
committerGitHub <noreply@github.com>2021-09-19 14:10:26 +0200
commit3d05ebfdc3524cff9f01b760176e175e73b55875 (patch)
treed9e028134a9476fd8880d2df777424784286836b /app/controllers/activitypub/followers_synchronizations_controller.rb
parent35469b1952c03ba8192bd28fc9cbc39cdcca9f4c (diff)
parentbf827b17e1c372f618652bff9578c36a751c44f5 (diff)
Merge pull request #1604 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/controllers/activitypub/followers_synchronizations_controller.rb')
-rw-r--r--app/controllers/activitypub/followers_synchronizations_controller.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/activitypub/followers_synchronizations_controller.rb b/app/controllers/activitypub/followers_synchronizations_controller.rb
index 525031105..940b77cf0 100644
--- a/app/controllers/activitypub/followers_synchronizations_controller.rb
+++ b/app/controllers/activitypub/followers_synchronizations_controller.rb
@@ -19,11 +19,11 @@ class ActivityPub::FollowersSynchronizationsController < ActivityPub::BaseContro
   private
 
   def uri_prefix
-    signed_request_account.uri[/http(s?):\/\/[^\/]+\//]
+    signed_request_account.uri[Account::URL_PREFIX_RE]
   end
 
   def set_items
-    @items = @account.followers.where(Account.arel_table[:uri].matches(uri_prefix + '%', false, true)).pluck(:uri)
+    @items = @account.followers.where(Account.arel_table[:uri].matches("#{Account.sanitize_sql_like(uri_prefix)}/%", false, true)).or(@account.followers.where(uri: uri_prefix)).pluck(:uri)
   end
 
   def collection_presenter