Skip to content
Snippets Groups Projects
Commit 68c797be authored by ThibG's avatar ThibG Committed by Eugen Rochko
Browse files

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

Fixes #10429
parent 59cce076
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment