]> cat aescling's git repositories - mastodon.git/commitdiff
Allow Symbol keyed Hash in LinkedDataSignature (#4715)
authorunarist <m.unarist@gmail.com>
Sun, 27 Aug 2017 11:35:01 +0000 (20:35 +0900)
committerEugen Rochko <eugen@zeonfederated.com>
Sun, 27 Aug 2017 11:35:01 +0000 (13:35 +0200)
SerializarbleResource#as_json serializes to Symbol keyed Hash, but current
implementation of LinkedDataSignature expects String keyed Hash.

So it generates broken payload.

app/lib/activitypub/linked_data_signature.rb

index 7173aed19d42aaf00d2ce4b2d04b3292eb1da385..4483339a96b6bc1ef56f15662e81e5a266d83b72 100644 (file)
@@ -6,7 +6,7 @@ class ActivityPub::LinkedDataSignature
   CONTEXT = 'https://w3id.org/identity/v1'
 
   def initialize(json)
-    @json = json
+    @json = json.with_indifferent_access
   end
 
   def verify_account!