diff --git a/app/controllers/account/imports_controller.rb b/app/controllers/account/imports_controller.rb index ac93f40d1..1a62f83a0 100644 --- a/app/controllers/account/imports_controller.rb +++ b/app/controllers/account/imports_controller.rb @@ -4,6 +4,7 @@ class Account::ImportsController < ApplicationController disallow_account_scope only: %i[ new create ] allow_unauthorized_access only: :show before_action :set_import, only: %i[ show ] + before_action :ensure_accessed_by_owner, only: %i[ show ] def new end @@ -26,6 +27,10 @@ class Account::ImportsController < ApplicationController @import = Current.account.imports.find(params[:id]) end + def ensure_accessed_by_owner + head :forbidden unless @import.identity == Current.identity + end + def start_import(account) import = nil diff --git a/app/views/account/imports/new.html.erb b/app/views/account/imports/new.html.erb index bd75bbb3b..fd837a7b6 100644 --- a/app/views/account/imports/new.html.erb +++ b/app/views/account/imports/new.html.erb @@ -3,8 +3,6 @@

Import a Fizzy account

- -
Create an account using data from a Fizzy export. Upload the exported .zip file below.
diff --git a/app/views/mailers/import_mailer/failed.text.erb b/app/views/mailers/import_mailer/failed.text.erb index 412f7fb2d..82e3b772a 100644 --- a/app/views/mailers/import_mailer/failed.text.erb +++ b/app/views/mailers/import_mailer/failed.text.erb @@ -1,4 +1,4 @@ -Unfortunately, we were couldn't import your Fizzy account. +Unfortunately, we couldn't import your Fizzy account. This may be due to corrupted export data or a conflict with existing data. Please try again with a fresh export, or reach out for help if the problem persists. diff --git a/config/brakeman.ignore b/config/brakeman.ignore index 929804402..90f9d53c6 100644 --- a/config/brakeman.ignore +++ b/config/brakeman.ignore @@ -67,7 +67,7 @@ "cwe_id": [ 295 ], - "note": "" + "note": "Required for internal PureStorage self-signed certificates. Only used for trusted internal storage URLs." }, { "warning_type": "Mass Assignment", diff --git a/config/routes.rb b/config/routes.rb index 28f8bb1f6..979d2a86b 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -171,7 +171,6 @@ Rails.application.routes.draw do resource :landing - namespace :my do resource :identity, only: :show resources :access_tokens