Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/project_import_data.rb')
-rw-r--r--app/models/project_import_data.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/models/project_import_data.rb b/app/models/project_import_data.rb
index d374ee120d1..3b514d5c5ff 100644
--- a/app/models/project_import_data.rb
+++ b/app/models/project_import_data.rb
@@ -14,7 +14,12 @@ class ProjectImportData < ApplicationRecord
insecure_mode: true,
algorithm: 'aes-256-cbc'
- serialize :data, JSON # rubocop:disable Cop/ActiveRecordSerialize
+ # NOTE
+ # We are serializing a project as `data` in an "unsafe" way here
+ # because the credentials are necessary for a successful import.
+ # This is safe because the serialization is only going between rails
+ # and the database, never to any end users.
+ serialize :data, Serializers::UnsafeJson # rubocop:disable Cop/ActiveRecordSerialize
validates :project, presence: true