Log safely

This commit is contained in:
Raphael 2010-08-26 11:11:30 -07:00
parent eaeea663cd
commit 36f265fa2f

View file

@ -58,8 +58,12 @@ class Comment
end
def signature_valid?
Rails.logger.warn "Received comment has person #{person.inspect}"
Rails.logger.warn "Received comment has person key #{person.serialized_key}" if person
if person
Rails.logger.warn "Received comment has person #{person.inspect}" if person
Rails.logger.warn "Received comment has person key #{person.serialized_key}" if person
else
Rails.logger.warn "Received comment has no person"
end
verify_signature(creator_signature, person) && verify_signature(post_creator_signator, post.person)
end