accept comments from strangers
This commit is contained in:
parent
c7974f8046
commit
f3c20bf3c0
2 changed files with 1 additions and 3 deletions
|
|
@ -58,8 +58,7 @@ class Comment
|
|||
end
|
||||
|
||||
def signature_valid?
|
||||
Rails.logger.warn "Received comment has no person" unless person
|
||||
verify_signature(creator_signature, person)
|
||||
person ? verify_signature(creator_signature, person) : true
|
||||
end
|
||||
|
||||
protected
|
||||
|
|
|
|||
|
|
@ -195,7 +195,6 @@ class User
|
|||
person.save
|
||||
|
||||
elsif object.is_a?(Comment)
|
||||
object.person.save
|
||||
raise "In receive for #{self.real_name}, signature was not valid on: #{object.inspect}" unless object.post.person == self.person || object.verify_post_creator_signature
|
||||
object.save
|
||||
dispatch_comment object unless owns?(object)
|
||||
|
|
|
|||
Loading…
Reference in a new issue