Ensure request.body isn't emptied out before signature verification (#10432)

Fixes #10429
th-downstream
ThibG 6 years ago committed by Eugen Rochko
parent 0aea1c0775
commit 65930be714

@ -32,7 +32,10 @@ class ActivityPub::InboxesController < Api::BaseController
end
def body
@body ||= request.body.read.force_encoding('UTF-8')
return @body if defined?(@body)
@body = request.body.read.force_encoding('UTF-8')
request.body.rewind if request.body.respond_to?(:rewind)
@body
end
def upgrade_account

Loading…
Cancel
Save