diff options
Diffstat (limited to 'lib/tasks/temp.rake')
-rw-r--r-- | lib/tasks/temp.rake | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/tasks/temp.rake b/lib/tasks/temp.rake new file mode 100644 index 000000000..ce04c7ddd --- /dev/null +++ b/lib/tasks/temp.rake @@ -0,0 +1,15 @@ +namespace :temp do + + desc "Remove plaintext passwords from post_redirect params" + task :remove_post_redirect_passwords => :environment do + PostRedirect.find_each(:conditions => ['post_params_yaml is not null']) do |post_redirect| + if post_redirect.post_params && post_redirect.post_params[:signchangeemail] && post_redirect.post_params[:signchangeemail][:password] + params = post_redirect.post_params + params[:signchangeemail].delete(:password) + post_redirect.post_params = params + post_redirect.save! + end + end + end + +end |