Skip to content

Commit 20625a2

Browse files
author
GitLab Bot
committed
Add latest changes from gitlab-org/gitlab@master
1 parent 5b4e0ca commit 20625a2

File tree

36 files changed

+731
-84
lines changed

36 files changed

+731
-84
lines changed

.rubocop_todo/layout/line_length.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1804,7 +1804,6 @@ Layout/LineLength:
18041804
- 'ee/spec/requests/api/related_epic_links_spec.rb'
18051805
- 'ee/spec/requests/api/releases_spec.rb'
18061806
- 'ee/spec/requests/api/resource_iteration_events_spec.rb'
1807-
- 'ee/spec/requests/api/search_spec.rb'
18081807
- 'ee/spec/requests/api/settings_spec.rb'
18091808
- 'ee/spec/requests/api/status_checks_spec.rb'
18101809
- 'ee/spec/requests/api/users_spec.rb'

.rubocop_todo/performance/map_compact.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ Performance/MapCompact:
6969
- 'ee/lib/gitlab/ci/reports/metrics/reports_comparer.rb'
7070
- 'ee/lib/gitlab/search/aggregation_parser.rb'
7171
- 'ee/spec/models/ee/member_spec.rb'
72-
- 'ee/spec/requests/api/search_spec.rb'
7372
- 'haml_lint/linter/no_plain_nodes.rb'
7473
- 'lib/api/entities/feature.rb'
7574
- 'lib/api/helpers/common_helpers.rb'

.rubocop_todo/rails/pluck.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ Rails/Pluck:
7171
- 'ee/spec/requests/api/protected_environments_spec.rb'
7272
- 'ee/spec/requests/api/protected_tags_spec.rb'
7373
- 'ee/spec/requests/api/releases_spec.rb'
74-
- 'ee/spec/requests/api/search_spec.rb'
7574
- 'ee/spec/requests/api/status_checks_spec.rb'
7675
- 'ee/spec/requests/api/users_spec.rb'
7776
- 'ee/spec/requests/api/vulnerabilities_spec.rb'

.rubocop_todo/rspec/before_all_role_assignment.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,6 @@ RSpec/BeforeAllRoleAssignment:
470470
- 'ee/spec/requests/api/related_epic_links_spec.rb'
471471
- 'ee/spec/requests/api/repositories_spec.rb'
472472
- 'ee/spec/requests/api/saml_group_links_spec.rb'
473-
- 'ee/spec/requests/api/search_spec.rb'
474473
- 'ee/spec/requests/api/todos_spec.rb'
475474
- 'ee/spec/requests/api/vulnerabilities_spec.rb'
476475
- 'ee/spec/requests/api/vulnerability_exports_spec.rb'

CHANGELOG.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,23 @@
22
documentation](doc/development/changelog.md) for instructions on adding your own
33
entry.
44

5+
## 17.4.2 (2024-10-09)
6+
7+
### Fixed (1 change)
8+
9+
- [Drop project_id not null constraint ci_deleted_objects](https://gitlab.com/gitlab-org/security/gitlab/-/commit/e02a0c065456a51ad57a93d56150271cc4dd442e)
10+
11+
### Security (8 changes)
12+
13+
- [Do not create a pipeline on MR refresh if source branch was deleted](https://gitlab.com/gitlab-org/security/gitlab/-/commit/66c4e57a3494686a9dc6058d2348074b465f5dd3) ([merge request](https://gitlab.com/gitlab-org/security/gitlab/-/merge_requests/4522))
14+
- [Escape OAuth application name on authorize page](https://gitlab.com/gitlab-org/security/gitlab/-/commit/293bb1f70c681b75672e0b41af84ab5ae47d1e1e) ([merge request](https://gitlab.com/gitlab-org/security/gitlab/-/merge_requests/4517))
15+
- [Prevent guest access to project templates](https://gitlab.com/gitlab-org/security/gitlab/-/commit/544398bdf7ea2b81100f8b95496f14d9b4698db8) ([merge request](https://gitlab.com/gitlab-org/security/gitlab/-/merge_requests/4477))
16+
- [Remove access to local requests via cube query service](https://gitlab.com/gitlab-org/security/gitlab/-/commit/86894edacdaf1cad4b0e85f71918109d48013ccb) ([merge request](https://gitlab.com/gitlab-org/security/gitlab/-/merge_requests/4492))
17+
- [External webhook token should be set](https://gitlab.com/gitlab-org/security/gitlab/-/commit/70fb8bebe2e8f1b85d625a8e496515c3f7e0e6d8) ([merge request](https://gitlab.com/gitlab-org/security/gitlab/-/merge_requests/4510))
18+
- [Skip content when listing conflict files with types](https://gitlab.com/gitlab-org/security/gitlab/-/commit/c19d8a96d103680ec874327c1631e179e17da06a) ([merge request](https://gitlab.com/gitlab-org/security/gitlab/-/merge_requests/4513))
19+
- [Hide version info from unauthorized users](https://gitlab.com/gitlab-org/security/gitlab/-/commit/0dd81e22f819f916c50cf531fa769000e9b5941b) ([merge request](https://gitlab.com/gitlab-org/security/gitlab/-/merge_requests/4500))
20+
- [Prevent deploy keys from pushing code to an archived project](https://gitlab.com/gitlab-org/security/gitlab/-/commit/ed7a5173cae50f610d2c0263197f7996653cfc10) ([merge request](https://gitlab.com/gitlab-org/security/gitlab/-/merge_requests/4486))
21+
522
## 17.4.1 (2024-09-24)
623

724
### Fixed (2 changes)
@@ -872,6 +889,23 @@ entry.
872889

873890
- [Update learn more link and docs formatting](https://gitlab.com/gitlab-org/gitlab/-/commit/6f536fdb20c2d2b96124afe693042c91483a32b2) ([merge request](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/164889))
874891

892+
## 17.3.5 (2024-10-09)
893+
894+
### Fixed (1 change)
895+
896+
- [Ensure levels is an array](https://gitlab.com/gitlab-org/security/gitlab/-/commit/74594891f31984feaaae6a069f057d6f48a489a6)
897+
898+
### Security (8 changes)
899+
900+
- [Do not create a pipeline on MR refresh if source branch was deleted](https://gitlab.com/gitlab-org/security/gitlab/-/commit/c36869b2e5cb0f88793bec7e20ded3e4d005f942) ([merge request](https://gitlab.com/gitlab-org/security/gitlab/-/merge_requests/4523))
901+
- [Escape OAuth application name on authorize page](https://gitlab.com/gitlab-org/security/gitlab/-/commit/b5a704563f746e5c61301d3a7db0eab68d434e24) ([merge request](https://gitlab.com/gitlab-org/security/gitlab/-/merge_requests/4518))
902+
- [Prevent guest access to project templates](https://gitlab.com/gitlab-org/security/gitlab/-/commit/92d177e2c5aaafb4f74bc2ceafe39b9a068e803d) ([merge request](https://gitlab.com/gitlab-org/security/gitlab/-/merge_requests/4449))
903+
- [Remove access to local requests via cube query service](https://gitlab.com/gitlab-org/security/gitlab/-/commit/7043d0116cbf2051907dfd88d56ed3f847ab95b2) ([merge request](https://gitlab.com/gitlab-org/security/gitlab/-/merge_requests/4493))
904+
- [External webhook token should be set](https://gitlab.com/gitlab-org/security/gitlab/-/commit/77c2a678acfc6fded56c6e10147701b6ef7aaeb5) ([merge request](https://gitlab.com/gitlab-org/security/gitlab/-/merge_requests/4511))
905+
- [Skip content when listing conflict files with types](https://gitlab.com/gitlab-org/security/gitlab/-/commit/2b559425cb195a78007db930cbbf8450b5254c89) ([merge request](https://gitlab.com/gitlab-org/security/gitlab/-/merge_requests/4514))
906+
- [Hide version info from unauthorized users](https://gitlab.com/gitlab-org/security/gitlab/-/commit/94e70d423789a50fc8e172b002bf1428593bbc51) ([merge request](https://gitlab.com/gitlab-org/security/gitlab/-/merge_requests/4501))
907+
- [Prevent deploy keys from pushing code to an archived project](https://gitlab.com/gitlab-org/security/gitlab/-/commit/3cd52356b4b1194e7108af832d5da4087e4be05c) ([merge request](https://gitlab.com/gitlab-org/security/gitlab/-/merge_requests/4487))
908+
875909
## 17.3.4 (2024-09-24)
876910

877911
### Security (3 changes)
@@ -1662,6 +1696,23 @@ No changes.
16621696
- [Dynamically gets the column type for assertion](https://gitlab.com/gitlab-org/gitlab/-/commit/1389a3daffd104925cce71776903cbf527723222) ([merge request](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/159099))
16631697
- [Quarantine a flaky test](https://gitlab.com/gitlab-org/gitlab/-/commit/c94fca35b909440ec66ea35c97ab11aa847dde58) ([merge request](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/158180))
16641698

1699+
## 17.2.9 (2024-10-09)
1700+
1701+
### Fixed (1 change)
1702+
1703+
- [Ensure levels is an array](https://gitlab.com/gitlab-org/security/gitlab/-/commit/d5450d020895b9fab3c7c6ad4191001308590899)
1704+
1705+
### Security (8 changes)
1706+
1707+
- [Do not create a pipeline on MR refresh if source branch was deleted](https://gitlab.com/gitlab-org/security/gitlab/-/commit/3dd89a71b436e8218a5d159a1dd75cb2de078129) ([merge request](https://gitlab.com/gitlab-org/security/gitlab/-/merge_requests/4524))
1708+
- [Escape OAuth application name on authorize page](https://gitlab.com/gitlab-org/security/gitlab/-/commit/b5cf4d286ae83033912e342177a501ffc2ad6a53) ([merge request](https://gitlab.com/gitlab-org/security/gitlab/-/merge_requests/4519))
1709+
- [Prevent guest access to project templates](https://gitlab.com/gitlab-org/security/gitlab/-/commit/9666414231dbfc03eb0711ec501b7d02665120df) ([merge request](https://gitlab.com/gitlab-org/security/gitlab/-/merge_requests/4450))
1710+
- [Remove access to local requests via cube query service](https://gitlab.com/gitlab-org/security/gitlab/-/commit/1a46c8c1753f08ba55e8a0d2fbcbc710feecf898) ([merge request](https://gitlab.com/gitlab-org/security/gitlab/-/merge_requests/4494))
1711+
- [External webhook token should be set](https://gitlab.com/gitlab-org/security/gitlab/-/commit/c795ea96a4dac381cf434aa7e3f379907ec6366d) ([merge request](https://gitlab.com/gitlab-org/security/gitlab/-/merge_requests/4512))
1712+
- [Skip content when listing conflict files with types](https://gitlab.com/gitlab-org/security/gitlab/-/commit/c7f598b42b0c6cd68cdcdb8b79293e7e2b22b457) ([merge request](https://gitlab.com/gitlab-org/security/gitlab/-/merge_requests/4515))
1713+
- [Hide version info from unauthorized users](https://gitlab.com/gitlab-org/security/gitlab/-/commit/0184d4e9c665c209e1c67eff2da9059e17304f1d) ([merge request](https://gitlab.com/gitlab-org/security/gitlab/-/merge_requests/4502))
1714+
- [Prevent deploy keys from pushing code to an archived project](https://gitlab.com/gitlab-org/security/gitlab/-/commit/0a5dc2f0b302123a941a4676eedd52c3423ef73b) ([merge request](https://gitlab.com/gitlab-org/security/gitlab/-/merge_requests/4488))
1715+
16651716
## 17.2.8 (2024-09-24)
16661717

16671718
### Security (3 changes)

app/assets/javascripts/super_sidebar/components/help_center.vue

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -48,19 +48,7 @@ export default {
4848
},
4949
computed: {
5050
itemGroups() {
51-
return {
52-
versionCheck: {
53-
items: [
54-
{
55-
text: this.$options.i18n.version,
56-
href: helpPagePath('update/index'),
57-
version: `${this.sidebarData.gitlab_version.major}.${this.sidebarData.gitlab_version.minor}`,
58-
extraAttrs: {
59-
...this.trackingAttrs('version_help_dropdown'),
60-
},
61-
},
62-
],
63-
},
51+
const groups = {
6452
helpLinks: {
6553
items: [
6654
{
@@ -157,6 +145,23 @@ export default {
157145
].filter(Boolean),
158146
},
159147
};
148+
149+
if (this.sidebarData.show_version_check) {
150+
groups.versionCheck = {
151+
items: [
152+
{
153+
text: this.$options.i18n.version,
154+
href: helpPagePath('update/index'),
155+
version: `${this.sidebarData.gitlab_version.major}.${this.sidebarData.gitlab_version.minor}`,
156+
extraAttrs: {
157+
...this.trackingAttrs('version_help_dropdown'),
158+
},
159+
},
160+
],
161+
};
162+
}
163+
164+
return groups;
160165
},
161166
updateSeverity() {
162167
return this.sidebarData.gitlab_version_check?.severity;

app/helpers/diff_helper.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,12 @@ def conflicts_with_types
266266
return unless merge_request.cannot_be_merged? && merge_request.source_branch_exists? && merge_request.target_branch_exists?
267267

268268
cached_conflicts_with_types do
269-
conflicts_service = MergeRequests::Conflicts::ListService.new(merge_request, allow_tree_conflicts: true) # rubocop:disable CodeReuse/ServiceClass
269+
# We set skip_content to true since we don't really need the content to list the conflicts and their types
270+
conflicts_service = MergeRequests::Conflicts::ListService.new( # rubocop:disable CodeReuse/ServiceClass
271+
merge_request,
272+
allow_tree_conflicts: true,
273+
skip_content: true
274+
)
270275

271276
{}.tap do |h|
272277
conflicts_service.conflicts.files.each do |file|

app/helpers/sidebars_helper.rb

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,24 +43,20 @@ def super_sidebar_context(user, group:, project:, panel:, panel_type:) # rubocop
4343
end
4444

4545
def super_sidebar_logged_out_context(panel:, panel_type:) # rubocop:disable Metrics/AbcSize
46-
{
46+
super_sidebar_instance_version_data.merge(super_sidebar_whats_new_data).merge({
4747
is_logged_in: false,
4848
context_switcher_links: context_switcher_links,
4949
current_menu_items: panel.super_sidebar_menu_items,
5050
current_context_header: panel.super_sidebar_context_header,
5151
support_path: support_url,
5252
docs_path: help_docs_path,
5353
display_whats_new: display_whats_new?,
54-
whats_new_most_recent_release_items_count: whats_new_most_recent_release_items_count,
55-
whats_new_version_digest: whats_new_version_digest,
5654
show_version_check: show_version_check?,
57-
gitlab_version: Gitlab.version_info,
58-
gitlab_version_check: gitlab_version_check,
5955
search: search_data,
6056
panel_type: panel_type,
6157
shortcut_links: shortcut_links,
6258
terms: terms_link
63-
}
59+
})
6460
end
6561

6662
def super_sidebar_logged_in_context(user, group:, project:, panel:, panel_type:) # rubocop:disable Metrics/AbcSize
@@ -126,6 +122,24 @@ def super_sidebar_logged_in_context(user, group:, project:, panel:, panel_type:)
126122
})
127123
end
128124

125+
def super_sidebar_instance_version_data
126+
return {} unless show_version_check?
127+
128+
{
129+
gitlab_version: Gitlab.version_info,
130+
gitlab_version_check: gitlab_version_check
131+
}
132+
end
133+
134+
def super_sidebar_whats_new_data
135+
return {} unless display_whats_new?
136+
137+
{
138+
whats_new_most_recent_release_items_count: whats_new_most_recent_release_items_count,
139+
whats_new_version_digest: whats_new_version_digest
140+
}
141+
end
142+
129143
def work_items_modal_data(group)
130144
return unless group && group.id
131145

app/services/auth/container_registry_authentication_service.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,11 @@ def ensure_container_repository!(path, actions)
226226
return if path.has_repository?
227227
return unless actions.include?('push')
228228

229+
find_or_create_repository_from_path(path)
230+
end
231+
232+
# Overridden in EE
233+
def find_or_create_repository_from_path(path)
229234
ContainerRepository.find_or_create_from_path!(path)
230235
end
231236

app/services/issuable_base_service.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ def set_issuable_author(issuable)
239239
elsif author_id
240240
issuable.author_id = author_id
241241
else
242-
issuable.author = current_user
242+
issuable.author ||= current_user
243243
end
244244
end
245245

app/services/merge_requests/conflicts/list_service.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ def conflicts
3030
@conflicts ||=
3131
Gitlab::Conflict::FileCollection.new(
3232
merge_request,
33-
allow_tree_conflicts: params[:allow_tree_conflicts]
33+
allow_tree_conflicts: params[:allow_tree_conflicts],
34+
skip_content: params[:skip_content]
3435
)
3536
end
3637
end

app/services/merge_requests/refresh_service.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def refresh_merge_requests!
4444
mark_mr_as_draft_from_commits(mr)
4545
execute_mr_web_hooks(mr)
4646
# Run at the end of the loop to avoid any potential contention on the MR object
47-
refresh_pipelines_on_merge_requests(mr)
47+
refresh_pipelines_on_merge_requests(mr) unless @push.branch_removed?
4848
merge_request_activity_counter.track_mr_including_ci_config(user: mr.author, merge_request: mr)
4949
end
5050

app/views/doorkeeper/authorizations/new.html.haml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
.gl-ml-auto.gl-mr-auto{ class: 'sm:gl-w-1/2' }
22
.gl-items-center
33
.gl-text-size-h1
4-
= html_escape(_('%{client_name} is requesting access to your account on %{title}.')) % { title: brand_title.html_safe, client_name: "<strong>#{html_escape(@pre_auth.client.name)}</strong>".html_safe }
4+
= safe_format(_('%{strong_start}%{client_name}%{strong_end} is requesting access to your account on %{title}.'),
5+
{ client_name: @pre_auth.client.name, title: brand_title },
6+
tag_pair(tag.strong, :strong_start, :strong_end))
57
.gl-flex.gl-items-center.gl-gap-2.gl-py-5
68
= render Pajamas::AvatarComponent.new(current_user, size: 24, avatar_options: { data: { testid: 'user_avatar_content' }, title: current_user.username })
79
.gl-pl-1
@@ -12,7 +14,9 @@
1214
- if current_user.admin?
1315
= render Pajamas::AlertComponent.new(variant: :warning, dismissible: false, alert_options: { class: 'gl-mb-5'}) do |c|
1416
- c.with_body do
15-
= html_escape(_('You are an administrator, which means authorizing access to %{client_name} will allow it to interact with GitLab as an administrator as well.')) % { client_name: "<strong>#{html_escape(@pre_auth.client.name)}</strong>".html_safe }
17+
= safe_format(_('You are an administrator, which means authorizing access to %{strong_start}%{client_name}%{strong_end} will allow it to interact with GitLab as an administrator as well.'),
18+
{ client_name: @pre_auth.client.name },
19+
tag_pair(tag.strong, :strong_start, :strong_end))
1620
- if @pre_auth.scopes
1721
- @pre_auth.scopes.each do |scope|
1822
%strong= t scope, scope: [:doorkeeper, :scopes]
@@ -26,12 +30,17 @@
2630
- else
2731
%p.gl-text-orange-500
2832
= sprite_icon('warning-solid')
29-
= html_escape(_('Make sure you trust %{client_name} before authorizing.')) % { client_name: "<strong>#{html_escape(@pre_auth.client.name)}</strong>".html_safe }
33+
= safe_format(_('Make sure you trust %{strong_start}%{client_name}%{strong_end} before authorizing.'),
34+
{ client_name: @pre_auth.client.name },
35+
tag_pair(tag.strong, :strong_start, :strong_end))
3036
%p
31-
= html_escape(_('%{owner} %{created_date} ago.')) % { owner: auth_app_owner_text(@pre_auth.client.application.owner), created_date: time_ago_in_words(@pre_auth.client.application.created_at.to_date) }
37+
= safe_format(_('%{owner} %{created_date} ago.'),
38+
{ owner: auth_app_owner_text(@pre_auth.client.application.owner),
39+
created_date: time_ago_in_words(@pre_auth.client.application.created_at.to_date) })
3240
- domain = URI.parse(@pre_auth.redirect_uri).host.gsub(/^www\./, '')
3341
- if @pre_auth.redirect_uri.start_with?('http://', 'https://') && domain != 'localhost'
34-
= html_escape(_('You will be redirected to %{domain} after authorizing.')) % { domain: "<strong>#{domain}</strong>".html_safe }
42+
= safe_format(_('You will be redirected to %{strong_start}%{domain}%{strong_end} after authorizing.'),
43+
{ domain: domain }, tag_pair(tag.strong, :strong_start, :strong_end))
3544
%div
3645
= form_tag oauth_authorization_path, method: :post, class: 'gl-inline-block gl-pr-3' do
3746
= hidden_field_tag :client_id, @pre_auth.client.uid
@@ -44,8 +53,8 @@
4453
= hidden_field_tag :code_challenge_method, @pre_auth.code_challenge_method
4554
= render Pajamas::ButtonComponent.new(type: :submit,
4655
variant: :confirm,
47-
button_options: {testid: 'authorization-button'}) do
48-
= html_escape(_('Authorize %{client_name}')) % { client_name: @pre_auth.client.name.html_safe }
56+
button_options: { data: { testid: 'authorization-button' }}) do
57+
= safe_format(_('Authorize %{client_name}'), { client_name: @pre_auth.client.name })
4958
= form_tag oauth_authorization_path, method: :delete, class: 'gl-inline-block' do
5059
= hidden_field_tag :client_id, @pre_auth.client.uid
5160
= hidden_field_tag :redirect_uri, @pre_auth.redirect_uri

0 commit comments

Comments
 (0)