a couple of logger lines to help debug on remote

This commit is contained in:
ilya 2010-10-03 17:33:31 -07:00
parent dadacbd092
commit 3eaf4e0ba1
3 changed files with 5 additions and 3 deletions

View file

@ -2,6 +2,7 @@ module Diaspora
module UserModules module UserModules
module Receiving module Receiving
def receive_salmon salmon_xml def receive_salmon salmon_xml
Rails.logger.info("#{self.real_name} got a salmon #{salmon_xml}")
salmon = Salmon::SalmonSlap.parse salmon_xml, self salmon = Salmon::SalmonSlap.parse salmon_xml, self
if salmon.verified_for_key?(salmon.author.public_key) if salmon.verified_for_key?(salmon.author.public_key)
Rails.logger.info("data in salmon: #{salmon.parsed_data}") Rails.logger.info("data in salmon: #{salmon.parsed_data}")

View file

@ -37,6 +37,7 @@ module Encryptor
module Private module Private
def decrypt cipher_json def decrypt cipher_json
Rails.logger.info("#{self.real_name} is JSON parsing the #{ Base64.decode64 cipher_json} ")
json = JSON.parse(Base64.decode64 cipher_json) json = JSON.parse(Base64.decode64 cipher_json)
aes_key = get_aes_key json['aes_key'] aes_key = get_aes_key json['aes_key']
aes_decrypt(json['ciphertext'], aes_key) aes_decrypt(json['ciphertext'], aes_key)

View file

@ -62,9 +62,9 @@ module Salmon
### Header ## ### Header ##
decrypted_header = user.decrypt(doc.search('encrypted_header').text) decrypted_header = user.decrypt(doc.search('encrypted_header').text)
header_doc = Nokogiri::XML(decrypted_header) header_doc = Nokogiri::XML(decrypted_header)
slap.aes_key = header_doc.search('aes_key').text slap.aes_key = header_doc.search('aes_key').text
slap.iv = header_doc.search('iv').text slap.iv = header_doc.search('iv').text
slap.magic_sig = MagicSigEnvelope.parse sig_doc slap.magic_sig = MagicSigEnvelope.parse sig_doc