a couple of logger lines to help debug on remote
This commit is contained in:
parent
dadacbd092
commit
3eaf4e0ba1
3 changed files with 5 additions and 3 deletions
|
|
@ -2,6 +2,7 @@ module Diaspora
|
|||
module UserModules
|
||||
module Receiving
|
||||
def receive_salmon salmon_xml
|
||||
Rails.logger.info("#{self.real_name} got a salmon #{salmon_xml}")
|
||||
salmon = Salmon::SalmonSlap.parse salmon_xml, self
|
||||
if salmon.verified_for_key?(salmon.author.public_key)
|
||||
Rails.logger.info("data in salmon: #{salmon.parsed_data}")
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ module Encryptor
|
|||
|
||||
module Private
|
||||
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)
|
||||
aes_key = get_aes_key json['aes_key']
|
||||
aes_decrypt(json['ciphertext'], aes_key)
|
||||
|
|
|
|||
|
|
@ -62,9 +62,9 @@ module Salmon
|
|||
|
||||
### Header ##
|
||||
decrypted_header = user.decrypt(doc.search('encrypted_header').text)
|
||||
header_doc = Nokogiri::XML(decrypted_header)
|
||||
slap.aes_key = header_doc.search('aes_key').text
|
||||
slap.iv = header_doc.search('iv').text
|
||||
header_doc = Nokogiri::XML(decrypted_header)
|
||||
slap.aes_key = header_doc.search('aes_key').text
|
||||
slap.iv = header_doc.search('iv').text
|
||||
|
||||
slap.magic_sig = MagicSigEnvelope.parse sig_doc
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue