removed the algo field and a commented line
This commit is contained in:
parent
4cdfe8431b
commit
b7288c8d8e
2 changed files with 0 additions and 57 deletions
|
|
@ -1,56 +0,0 @@
|
|||
class AddAlgorithmFieldsToRelayableObjects < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :comments, :author_signature_algo, :string
|
||||
add_column :comments, :parent_author_signature_algo, :string
|
||||
|
||||
execute <<SQL
|
||||
UPDATE comments
|
||||
SET comments.author_signature_algo = "SHA"
|
||||
WHERE comments.author_signature IS NOT NULL;
|
||||
SQL
|
||||
execute <<SQL
|
||||
UPDATE comments
|
||||
SET comments.parent_author_signature_algo = "SHA"
|
||||
WHERE comments.author_signature IS NOT NULL
|
||||
SQL
|
||||
|
||||
add_column :likes, :author_signature_algo, :string
|
||||
add_column :likes, :parent_author_signature_algo, :string
|
||||
|
||||
execute <<SQL
|
||||
UPDATE likes
|
||||
SET likes.author_signature_algo = "SHA"
|
||||
WHERE likes.author_signature IS NOT NULL
|
||||
SQL
|
||||
execute <<SQL
|
||||
UPDATE likes
|
||||
SET likes.parent_author_signature_algo = "SHA"
|
||||
WHERE likes.author_signature IS NOT NULL
|
||||
SQL
|
||||
|
||||
add_column :messages, :author_signature_algo, :string
|
||||
add_column :messages, :parent_author_signature_algo, :string
|
||||
|
||||
execute <<SQL
|
||||
UPDATE messages
|
||||
SET messages.author_signature_algo = "SHA"
|
||||
WHERE messages.author_signature IS NOT NULL
|
||||
SQL
|
||||
execute <<SQL
|
||||
UPDATE messages
|
||||
SET messages.parent_author_signature_algo = "SHA"
|
||||
WHERE messages.author_signature IS NOT NULL
|
||||
SQL
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :messages, :parent_author_signature_algo
|
||||
remove_column :messages, :author_signature_algo
|
||||
|
||||
remove_column :likes, :parent_author_signature_algo
|
||||
remove_column :likes, :author_signature_algo
|
||||
|
||||
remove_column :comments, :parent_author_signature_algo
|
||||
remove_column :comments, :author_signature_algo
|
||||
end
|
||||
end
|
||||
|
|
@ -23,7 +23,6 @@ module Diaspora
|
|||
if !validity && Time.now < Time.parse(LAST_FALLBACK_TIME)
|
||||
validity = person.public_key.verify "SHA", Base64.decode64(signature), signable_string
|
||||
end
|
||||
#validity = person.public_key.verify "SHA", Base64.decode64(signature), signable_string
|
||||
log_string += " validity=#{validity}"
|
||||
Rails.logger.info(log_string)
|
||||
validity
|
||||
|
|
|
|||
Loading…
Reference in a new issue