プロジェクト

全般

プロフィール

Vote #70619

完了

db:encrypt fails to handle repositories with blank password

Admin Redmine さんがほぼ2年前に追加. ほぼ2年前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Database_21
対象バージョン:
開始日:
2011/08/27
期日:
進捗率:

0%

予定工数:
category_id:
21
version_id:
39
issue_org_id:
9137
author_id:
453
assigned_to_id:
0
comments:
3
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
27
ステータス-->[Closed]

説明

I got this result:

# rake db:encrypt RAILS_ENV=production --trace
(in /www/sites/duckcorp/projects.duckcorp.org/redmine-1.2.0)
NOTE: SourceIndex.new(hash) is deprecated; From /www/sites/duckcorp/projects.duckcorp.org/redmine-1.2.0/config/../vendor/rails/railties/lib/rails/vendor_gem_source_index.rb:100:in `new'.
** Invoke db:encrypt (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:encrypt
rake aborted!
data must not be empty
/www/sites/duckcorp/projects.duckcorp.org/redmine-1.2.0/lib/redmine/ciphering.rb:34:in `update'
/www/sites/duckcorp/projects.duckcorp.org/redmine-1.2.0/lib/redmine/ciphering.rb:34:in `encrypt_text'
/www/sites/duckcorp/projects.duckcorp.org/redmine-1.2.0/lib/redmine/ciphering.rb:92:in `write_ciphered_attribute'
/www/sites/duckcorp/projects.duckcorp.org/redmine-1.2.0/app/models/repository.rb:58:in `password='
/www/sites/duckcorp/projects.duckcorp.org/redmine-1.2.0/lib/redmine/ciphering.rb:66:in `send'
/www/sites/duckcorp/projects.duckcorp.org/redmine-1.2.0/lib/redmine/ciphering.rb:66:in `encrypt_all'
/www/sites/duckcorp/projects.duckcorp.org/redmine-1.2.0/lib/redmine/ciphering.rb:64:in `each'
/www/sites/duckcorp/projects.duckcorp.org/redmine-1.2.0/lib/redmine/ciphering.rb:64:in `encrypt_all'
/www/sites/duckcorp/projects.duckcorp.org/redmine-1.2.0/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:136:in `transaction'
/www/sites/duckcorp/projects.duckcorp.org/redmine-1.2.0/vendor/rails/activerecord/lib/active_record/transactions.rb:182:in `transaction'
/www/sites/duckcorp/projects.duckcorp.org/redmine-1.2.0/lib/redmine/ciphering.rb:63:in `encrypt_all'
/www/sites/duckcorp/projects.duckcorp.org/redmine-1.2.0/lib/tasks/ciphering.rake:22
/usr/lib/ruby/1.8/rake.rb:636:in `call'
/usr/lib/ruby/1.8/rake.rb:636:in `execute'
/usr/lib/ruby/1.8/rake.rb:631:in `each'
/usr/lib/ruby/1.8/rake.rb:631:in `execute'
/usr/lib/ruby/1.8/rake.rb:597:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/lib/ruby/1.8/rake.rb:590:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/rake.rb:583:in `invoke'
/usr/lib/ruby/1.8/rake.rb:2051:in `invoke_task'
/usr/lib/ruby/1.8/rake.rb:2029:in `top_level'
/usr/lib/ruby/1.8/rake.rb:2029:in `each'
/usr/lib/ruby/1.8/rake.rb:2029:in `top_level'
/usr/lib/ruby/1.8/rake.rb:2068:in `standard_exception_handling'
/usr/lib/ruby/1.8/rake.rb:2023:in `top_level'
/usr/lib/ruby/1.8/rake.rb:2001:in `run'
/usr/lib/ruby/1.8/rake.rb:2068:in `standard_exception_handling'
/usr/lib/ruby/1.8/rake.rb:1998:in `run'
/usr/bin/rake:28

In my database, the 'login' and 'passwords' of all 'repositories' are empty strings (not NULL, but not sure it makes a difference). Trying to encrypt such an empty string later fails. The one-liner attached patch fixes this issue.


journals

--------------------------------------------------------------------------------
Fixed in r7985.
--------------------------------------------------------------------------------
Merged in r7997.
--------------------------------------------------------------------------------

Admin Redmine さんがほぼ2年前に更新

  • カテゴリDatabase_21 にセット
  • 対象バージョン1.2.3_39 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0