diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-30 02:49:08 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-30 02:49:18 +0300 |
commit | 38dadcee569adfbbb1c9dc99634bba4e9a9128bc (patch) | |
tree | 32661c6c5a8585196d1c84b7f4efcdc166cb8240 /lib/gitlab/background_migration | |
parent | 05bbfffcd3692a70849628ff36ecb8eeac4902af (diff) |
Add latest changes from gitlab-org/security/gitlab@15-9-stable-ee
Diffstat (limited to 'lib/gitlab/background_migration')
-rw-r--r-- | lib/gitlab/background_migration/nullify_last_error_from_project_mirror_data.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/gitlab/background_migration/nullify_last_error_from_project_mirror_data.rb b/lib/gitlab/background_migration/nullify_last_error_from_project_mirror_data.rb new file mode 100644 index 00000000000..6ea5c17353b --- /dev/null +++ b/lib/gitlab/background_migration/nullify_last_error_from_project_mirror_data.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +module Gitlab + module BackgroundMigration + # Nullifies last_error value from project_mirror_data table as they + # potentially included sensitive data. + # https://gitlab.com/gitlab-org/security/gitlab/-/merge_requests/3041 + class NullifyLastErrorFromProjectMirrorData < BatchedMigrationJob + feature_category :source_code_management + operation_name :update_all + + def perform + each_sub_batch { |rel| rel.update_all(last_error: nil) } + end + end + end +end |