about summary refs log tree commit diff
path: root/app/lib
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2019-07-11 14:49:55 +0200
committerGitHub <noreply@github.com>2019-07-11 14:49:55 +0200
commit4e8dcc5dbbf625b7268ed10d36122de985da6bdc (patch)
treee3b89b3232dda984298fbbae826a19522c60f6bd /app/lib
parenta6dc6a242fdabef2d0fdd9eb7b72ce11cbc22e3e (diff)
Add HTTP signatures to all outgoing ActivityPub GET requests (#11284)
Diffstat (limited to 'app/lib')
-rw-r--r--app/lib/request.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/lib/request.rb b/app/lib/request.rb
index 1fd3f5190..9d874fe2c 100644
--- a/app/lib/request.rb
+++ b/app/lib/request.rb
@@ -40,8 +40,8 @@ class Request
     set_digest! if options.key?(:body)
   end
 
-  def on_behalf_of(account, key_id_format = :acct, sign_with: nil)
-    raise ArgumentError, 'account must be local' unless account&.local?
+  def on_behalf_of(account, key_id_format = :uri, sign_with: nil)
+    raise ArgumentError, 'account must not be nil' if account.nil?
 
     @account       = account
     @keypair       = sign_with.present? ? OpenSSL::PKey::RSA.new(sign_with) : @account.keypair