summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-12-03 10:42:58 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-12-03 10:42:58 +0000
commit66e02f07ebd6ce82b1e3de5f78de8a94dc2dde99 (patch)
tree663200c8d8ffb37c2d7de2999984441666769712
parent211c772e464c569796cb91c5424e856d9fb4f697 (diff)
downloadgitlab-ce-66e02f07ebd6ce82b1e3de5f78de8a94dc2dde99.tar.gz
Add latest changes from gitlab-org/security/gitlab@14-3-stable-ee
-rw-r--r--Gemfile4
-rw-r--r--Gemfile.lock126
-rw-r--r--app/controllers/graphql_controller.rb16
-rw-r--r--app/graphql/gitlab_schema.rb3
-rw-r--r--config/initializers/postgresql_cte.rb2
-rw-r--r--package.json4
-rw-r--r--qa/Gemfile2
-rw-r--r--qa/Gemfile.lock4
-rw-r--r--spec/controllers/application_controller_spec.rb4
-rw-r--r--spec/controllers/graphql_controller_spec.rb38
-rw-r--r--spec/controllers/projects/design_management/designs/resized_image_controller_spec.rb2
-rw-r--r--spec/controllers/search_controller_spec.rb2
-rw-r--r--spec/factories/design_management/versions.rb2
-rw-r--r--spec/features/projects/badges/pipeline_badge_spec.rb2
-rw-r--r--spec/graphql/gitlab_schema_spec.rb34
-rw-r--r--spec/models/namespace/traversal_hierarchy_spec.rb9
-rw-r--r--spec/support/helpers/graphql_helpers.rb5
-rw-r--r--spec/support/shared_examples/controllers/wiki_actions_shared_examples.rb2
-rw-r--r--yarn.lock18
19 files changed, 189 insertions, 90 deletions
diff --git a/Gemfile b/Gemfile
index 39e61564968..9d11ba63a12 100644
--- a/Gemfile
+++ b/Gemfile
@@ -2,7 +2,7 @@
source 'https://rubygems.org'
-gem 'rails', '~> 6.1.3.2'
+gem 'rails', '~> 6.1.4.1'
gem 'bootsnap', '~> 1.4.6'
@@ -96,7 +96,7 @@ gem 'grape-entity', '~> 0.9.0'
gem 'rack-cors', '~> 1.0.6', require: 'rack/cors'
# GraphQL API
-gem 'graphql', '~> 1.11.8'
+gem 'graphql', '~> 1.11.10'
# NOTE: graphiql-rails v1.5+ doesn't work: https://gitlab.com/gitlab-org/gitlab/issues/31771
# TODO: remove app/views/graphiql/rails/editors/show.html.erb when https://github.com/rmosolgo/graphiql-rails/pull/71 is released:
# https://gitlab.com/gitlab-org/gitlab/issues/31747
diff --git a/Gemfile.lock b/Gemfile.lock
index d62e948e636..bf70b935582 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -11,63 +11,63 @@ GEM
RedCloth (4.3.2)
acme-client (2.0.6)
faraday (>= 0.17, < 2.0.0)
- actioncable (6.1.3.2)
- actionpack (= 6.1.3.2)
- activesupport (= 6.1.3.2)
+ actioncable (6.1.4.1)
+ actionpack (= 6.1.4.1)
+ activesupport (= 6.1.4.1)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
- actionmailbox (6.1.3.2)
- actionpack (= 6.1.3.2)
- activejob (= 6.1.3.2)
- activerecord (= 6.1.3.2)
- activestorage (= 6.1.3.2)
- activesupport (= 6.1.3.2)
+ actionmailbox (6.1.4.1)
+ actionpack (= 6.1.4.1)
+ activejob (= 6.1.4.1)
+ activerecord (= 6.1.4.1)
+ activestorage (= 6.1.4.1)
+ activesupport (= 6.1.4.1)
mail (>= 2.7.1)
- actionmailer (6.1.3.2)
- actionpack (= 6.1.3.2)
- actionview (= 6.1.3.2)
- activejob (= 6.1.3.2)
- activesupport (= 6.1.3.2)
+ actionmailer (6.1.4.1)
+ actionpack (= 6.1.4.1)
+ actionview (= 6.1.4.1)
+ activejob (= 6.1.4.1)
+ activesupport (= 6.1.4.1)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
- actionpack (6.1.3.2)
- actionview (= 6.1.3.2)
- activesupport (= 6.1.3.2)
+ actionpack (6.1.4.1)
+ actionview (= 6.1.4.1)
+ activesupport (= 6.1.4.1)
rack (~> 2.0, >= 2.0.9)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
- actiontext (6.1.3.2)
- actionpack (= 6.1.3.2)
- activerecord (= 6.1.3.2)
- activestorage (= 6.1.3.2)
- activesupport (= 6.1.3.2)
+ actiontext (6.1.4.1)
+ actionpack (= 6.1.4.1)
+ activerecord (= 6.1.4.1)
+ activestorage (= 6.1.4.1)
+ activesupport (= 6.1.4.1)
nokogiri (>= 1.8.5)
- actionview (6.1.3.2)
- activesupport (= 6.1.3.2)
+ actionview (6.1.4.1)
+ activesupport (= 6.1.4.1)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
- activejob (6.1.3.2)
- activesupport (= 6.1.3.2)
+ activejob (6.1.4.1)
+ activesupport (= 6.1.4.1)
globalid (>= 0.3.6)
- activemodel (6.1.3.2)
- activesupport (= 6.1.3.2)
- activerecord (6.1.3.2)
- activemodel (= 6.1.3.2)
- activesupport (= 6.1.3.2)
+ activemodel (6.1.4.1)
+ activesupport (= 6.1.4.1)
+ activerecord (6.1.4.1)
+ activemodel (= 6.1.4.1)
+ activesupport (= 6.1.4.1)
activerecord-explain-analyze (0.1.0)
activerecord (>= 4)
pg
- activestorage (6.1.3.2)
- actionpack (= 6.1.3.2)
- activejob (= 6.1.3.2)
- activerecord (= 6.1.3.2)
- activesupport (= 6.1.3.2)
+ activestorage (6.1.4.1)
+ actionpack (= 6.1.4.1)
+ activejob (= 6.1.4.1)
+ activerecord (= 6.1.4.1)
+ activesupport (= 6.1.4.1)
marcel (~> 1.0.0)
- mini_mime (~> 1.0.2)
- activesupport (6.1.3.2)
+ mini_mime (>= 1.1.0)
+ activesupport (6.1.4.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
@@ -506,8 +506,8 @@ GEM
omniauth (~> 1.3)
pyu-ruby-sasl (>= 0.0.3.3, < 0.1)
rubyntlm (~> 0.5)
- globalid (0.4.2)
- activesupport (>= 4.2.0)
+ globalid (0.5.2)
+ activesupport (>= 5.0)
gon (6.4.0)
actionpack (>= 3.0.20)
i18n (>= 0.7)
@@ -561,7 +561,7 @@ GEM
faraday (>= 1.0)
faraday_middleware
graphql-client
- graphql (1.11.8)
+ graphql (1.11.10)
graphql-client (0.16.0)
activesupport (>= 3.0)
graphql (~> 1.8)
@@ -747,7 +747,7 @@ GEM
mime-types-data (3.2020.0512)
mini_histogram (0.3.1)
mini_magick (4.10.1)
- mini_mime (1.0.2)
+ mini_mime (1.1.1)
mini_portile2 (2.5.3)
minitest (5.11.3)
mixlib-cli (2.1.8)
@@ -784,7 +784,7 @@ GEM
net-ssh (>= 2.6.5, < 7.0.0)
net-ssh (6.0.0)
netrc (0.11.0)
- nio4r (2.5.4)
+ nio4r (2.5.8)
no_proxy_fix (0.1.2)
nokogiri (1.11.7)
mini_portile2 (~> 2.5.0)
@@ -967,20 +967,20 @@ GEM
rack-test (1.1.0)
rack (>= 1.0, < 3)
rack-timeout (0.5.2)
- rails (6.1.3.2)
- actioncable (= 6.1.3.2)
- actionmailbox (= 6.1.3.2)
- actionmailer (= 6.1.3.2)
- actionpack (= 6.1.3.2)
- actiontext (= 6.1.3.2)
- actionview (= 6.1.3.2)
- activejob (= 6.1.3.2)
- activemodel (= 6.1.3.2)
- activerecord (= 6.1.3.2)
- activestorage (= 6.1.3.2)
- activesupport (= 6.1.3.2)
+ rails (6.1.4.1)
+ actioncable (= 6.1.4.1)
+ actionmailbox (= 6.1.4.1)
+ actionmailer (= 6.1.4.1)
+ actionpack (= 6.1.4.1)
+ actiontext (= 6.1.4.1)
+ actionview (= 6.1.4.1)
+ activejob (= 6.1.4.1)
+ activemodel (= 6.1.4.1)
+ activerecord (= 6.1.4.1)
+ activestorage (= 6.1.4.1)
+ activesupport (= 6.1.4.1)
bundler (>= 1.15.0)
- railties (= 6.1.3.2)
+ railties (= 6.1.4.1)
sprockets-rails (>= 2.0.0)
rails-controller-testing (1.0.5)
actionpack (>= 5.0.1.rc1)
@@ -994,11 +994,11 @@ GEM
rails-i18n (6.0.0)
i18n (>= 0.7, < 2)
railties (>= 6.0.0, < 7)
- railties (6.1.3.2)
- actionpack (= 6.1.3.2)
- activesupport (= 6.1.3.2)
+ railties (6.1.4.1)
+ actionpack (= 6.1.4.1)
+ activesupport (= 6.1.4.1)
method_source
- rake (>= 0.8.7)
+ rake (>= 0.13)
thor (~> 1.0)
rainbow (3.0.0)
rake (13.0.6)
@@ -1357,7 +1357,7 @@ GEM
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)
webrick (1.6.1)
- websocket-driver (0.7.3)
+ websocket-driver (0.7.5)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
wikicloth (0.8.1)
@@ -1490,7 +1490,7 @@ DEPENDENCIES
grape_logging (~> 1.7)
graphiql-rails (~> 1.4.10)
graphlient (~> 0.4.0)
- graphql (~> 1.11.8)
+ graphql (~> 1.11.10)
graphql-docs (~> 1.6.0)
grpc (~> 1.30.2)
gssapi
@@ -1579,7 +1579,7 @@ DEPENDENCIES
rack-oauth2 (~> 1.16.0)
rack-proxy (~> 0.6.0)
rack-timeout (~> 0.5.1)
- rails (~> 6.1.3.2)
+ rails (~> 6.1.4.1)
rails-controller-testing
rails-i18n (~> 6.0)
rainbow (~> 3.0)
diff --git a/app/controllers/graphql_controller.rb b/app/controllers/graphql_controller.rb
index 515fbd7b482..8b2b3afd134 100644
--- a/app/controllers/graphql_controller.rb
+++ b/app/controllers/graphql_controller.rb
@@ -7,6 +7,9 @@ class GraphqlController < ApplicationController
# Header can be passed by tests to disable SQL query limits.
DISABLE_SQL_QUERY_LIMIT_HEADER = 'HTTP_X_GITLAB_DISABLE_SQL_QUERY_LIMIT'
+ # Max size of the query text in characters
+ MAX_QUERY_SIZE = 10_000
+
# If a user is using their session to access GraphQL, we need to have session
# storage, since the admin-mode check is session wide.
# We can't enable this for anonymous users because that would cause users using
@@ -27,6 +30,7 @@ class GraphqlController < ApplicationController
before_action :set_user_last_activity
before_action :track_vs_code_usage
before_action :disable_query_limiting
+ before_action :limit_query_size
before_action :disallow_mutations_for_get
@@ -73,6 +77,16 @@ class GraphqlController < ApplicationController
raise ::Gitlab::Graphql::Errors::ArgumentError, "Mutations are forbidden in #{request.request_method} requests"
end
+ def limit_query_size
+ total_size = if multiplex?
+ params[:_json].sum { _1[:query].size }
+ else
+ query.size
+ end
+
+ raise ::Gitlab::Graphql::Errors::ArgumentError, "Query too large" if total_size > MAX_QUERY_SIZE
+ end
+
def any_mutating_query?
if multiplex?
multiplex_queries.any? { |q| mutation?(q[:query], q[:operation_name]) }
@@ -118,7 +132,7 @@ class GraphqlController < ApplicationController
end
def query
- params[:query]
+ params.fetch(:query, '')
end
def multiplex_queries
diff --git a/app/graphql/gitlab_schema.rb b/app/graphql/gitlab_schema.rb
index 38ba1611c48..d4c9269c681 100644
--- a/app/graphql/gitlab_schema.rb
+++ b/app/graphql/gitlab_schema.rb
@@ -26,6 +26,9 @@ class GitlabSchema < GraphQL::Schema
default_max_page_size 100
+ validate_max_errors 5
+ validate_timeout 0.2.seconds
+
lazy_resolve ::Gitlab::Graphql::Lazy, :force
class << self
diff --git a/config/initializers/postgresql_cte.rb b/config/initializers/postgresql_cte.rb
index 6a9af7b4868..7d00776e460 100644
--- a/config/initializers/postgresql_cte.rb
+++ b/config/initializers/postgresql_cte.rb
@@ -96,7 +96,7 @@ module ActiveRecord
end
end
- def build_arel(aliases)
+ def build_arel(aliases = nil)
arel = super
build_with(arel) if @values[:with]
diff --git a/package.json b/package.json
index 28ed6bf9393..64335d5aea5 100644
--- a/package.json
+++ b/package.json
@@ -59,8 +59,8 @@
"@gitlab/tributejs": "1.0.0",
"@gitlab/ui": "32.11.0",
"@gitlab/visual-review-tools": "1.6.1",
- "@rails/actioncable": "6.1.3-2",
- "@rails/ujs": "6.1.3-2",
+ "@rails/actioncable": "6.1.4-1",
+ "@rails/ujs": "6.1.4-1",
"@sentry/browser": "5.30.0",
"@sourcegraph/code-host-integration": "0.0.60",
"@tiptap/core": "^2.0.0-beta.105",
diff --git a/qa/Gemfile b/qa/Gemfile
index cc2355cdfa3..e0cafd5a8a4 100644
--- a/qa/Gemfile
+++ b/qa/Gemfile
@@ -3,7 +3,7 @@
source 'https://rubygems.org'
gem 'gitlab-qa', require: 'gitlab/qa'
-gem 'activesupport', '~> 6.1.3.2' # This should stay in sync with the root's Gemfile
+gem 'activesupport', '~> 6.1.4.1' # This should stay in sync with the root's Gemfile
gem 'allure-rspec', '~> 2.14.5'
gem 'capybara', '~> 3.35.0'
gem 'capybara-screenshot', '~> 1.0.23'
diff --git a/qa/Gemfile.lock b/qa/Gemfile.lock
index 5f33afaa77b..76a6cbda966 100644
--- a/qa/Gemfile.lock
+++ b/qa/Gemfile.lock
@@ -2,7 +2,7 @@ GEM
remote: https://rubygems.org/
specs:
abstract_type (0.0.7)
- activesupport (6.1.3.2)
+ activesupport (6.1.4.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
@@ -211,7 +211,7 @@ PLATFORMS
ruby
DEPENDENCIES
- activesupport (~> 6.1.3.2)
+ activesupport (~> 6.1.4.1)
airborne (~> 0.3.4)
allure-rspec (~> 2.14.5)
capybara (~> 3.35.0)
diff --git a/spec/controllers/application_controller_spec.rb b/spec/controllers/application_controller_spec.rb
index 218aa04dd3f..b69ef5313c0 100644
--- a/spec/controllers/application_controller_spec.rb
+++ b/spec/controllers/application_controller_spec.rb
@@ -704,7 +704,7 @@ RSpec.describe ApplicationController do
get :index
- expect(response.headers['Cache-Control']).to eq 'no-store'
+ expect(response.headers['Cache-Control']).to eq 'private, no-store'
expect(response.headers['Pragma']).to eq 'no-cache'
end
@@ -740,7 +740,7 @@ RSpec.describe ApplicationController do
it 'sets no-cache headers', :aggregate_failures do
subject
- expect(response.headers['Cache-Control']).to eq 'no-store'
+ expect(response.headers['Cache-Control']).to eq 'private, no-store'
expect(response.headers['Pragma']).to eq 'no-cache'
expect(response.headers['Expires']).to eq 'Fri, 01 Jan 1990 00:00:00 GMT'
end
diff --git a/spec/controllers/graphql_controller_spec.rb b/spec/controllers/graphql_controller_spec.rb
index aed97a01a72..518854cefaf 100644
--- a/spec/controllers/graphql_controller_spec.rb
+++ b/spec/controllers/graphql_controller_spec.rb
@@ -44,6 +44,44 @@ RSpec.describe GraphqlController do
expect(response).to have_gitlab_http_status(:ok)
end
+ it 'executes a simple query with no errors' do
+ post :execute, params: { query: '{ __typename }' }
+
+ expect(response).to have_gitlab_http_status(:ok)
+ expect(json_response).to eq({ 'data' => { '__typename' => 'Query' } })
+ end
+
+ it 'executes a simple multiplexed query with no errors' do
+ multiplex = [{ query: '{ __typename }' }] * 2
+
+ post :execute, params: { _json: multiplex }
+
+ expect(response).to have_gitlab_http_status(:ok)
+ expect(json_response).to eq([
+ { 'data' => { '__typename' => 'Query' } },
+ { 'data' => { '__typename' => 'Query' } }
+ ])
+ end
+
+ it 'sets a limit on the total query size' do
+ graphql_query = "{#{(['__typename'] * 1000).join(' ')}}"
+
+ post :execute, params: { query: graphql_query }
+
+ expect(response).to have_gitlab_http_status(:unprocessable_entity)
+ expect(json_response).to eq({ 'errors' => [{ 'message' => 'Query too large' }] })
+ end
+
+ it 'sets a limit on the total query size for multiplex queries' do
+ graphql_query = "{#{(['__typename'] * 200).join(' ')}}"
+ multiplex = [{ query: graphql_query }] * 5
+
+ post :execute, params: { _json: multiplex }
+
+ expect(response).to have_gitlab_http_status(:unprocessable_entity)
+ expect(json_response).to eq({ 'errors' => [{ 'message' => 'Query too large' }] })
+ end
+
it 'returns forbidden when user cannot access API' do
# User cannot access API in a couple of cases
# * When user is internal(like ghost users)
diff --git a/spec/controllers/projects/design_management/designs/resized_image_controller_spec.rb b/spec/controllers/projects/design_management/designs/resized_image_controller_spec.rb
index 56c0ef592ca..cc0f4a426f4 100644
--- a/spec/controllers/projects/design_management/designs/resized_image_controller_spec.rb
+++ b/spec/controllers/projects/design_management/designs/resized_image_controller_spec.rb
@@ -91,7 +91,7 @@ RSpec.describe Projects::DesignManagement::Designs::ResizedImageController do
# (the record that represents the design at a specific version), to
# verify that the correct file is being returned.
def etag(action)
- ActionDispatch::TestResponse.new.send(:generate_weak_etag, [action.cache_key, ''])
+ ActionDispatch::TestResponse.new.send(:generate_weak_etag, [action.cache_key])
end
specify { expect(newest_version.sha).not_to eq(oldest_version.sha) }
diff --git a/spec/controllers/search_controller_spec.rb b/spec/controllers/search_controller_spec.rb
index 4e87a9fc1ba..6bcb88278a0 100644
--- a/spec/controllers/search_controller_spec.rb
+++ b/spec/controllers/search_controller_spec.rb
@@ -305,7 +305,7 @@ RSpec.describe SearchController do
expect(response).to have_gitlab_http_status(:ok)
- expect(response.headers['Cache-Control']).to eq('no-store')
+ expect(response.headers['Cache-Control']).to eq('private, no-store')
end
end
diff --git a/spec/factories/design_management/versions.rb b/spec/factories/design_management/versions.rb
index 247a385bd0e..e505a77d6bd 100644
--- a/spec/factories/design_management/versions.rb
+++ b/spec/factories/design_management/versions.rb
@@ -52,9 +52,9 @@ FactoryBot.define do
.where(design_id: evaluator.deleted_designs.map(&:id))
.update_all(event: events[:deletion])
- version.designs.reload
# Ensure version.issue == design.issue for all version.designs
version.designs.update_all(issue_id: version.issue_id)
+ version.designs.reload
needed = evaluator.designs_count
have = version.designs.size
diff --git a/spec/features/projects/badges/pipeline_badge_spec.rb b/spec/features/projects/badges/pipeline_badge_spec.rb
index 9d8f9872a1a..e3a01ab6fa2 100644
--- a/spec/features/projects/badges/pipeline_badge_spec.rb
+++ b/spec/features/projects/badges/pipeline_badge_spec.rb
@@ -68,7 +68,7 @@ RSpec.describe 'Pipeline Badge' do
visit pipeline_project_badges_path(project, ref: ref, format: :svg)
expect(page.status_code).to eq(200)
- expect(page.response_headers['Cache-Control']).to eq('no-store')
+ expect(page.response_headers['Cache-Control']).to eq('private, no-store')
end
end
diff --git a/spec/graphql/gitlab_schema_spec.rb b/spec/graphql/gitlab_schema_spec.rb
index 3fa0dc95126..02c686af688 100644
--- a/spec/graphql/gitlab_schema_spec.rb
+++ b/spec/graphql/gitlab_schema_spec.rb
@@ -35,6 +35,10 @@ RSpec.describe GitlabSchema do
expect(connection).to eq(Gitlab::Graphql::Pagination::ExternallyPaginatedArrayConnection)
end
+ it 'sets an appropriate validation timeout' do
+ expect(described_class.validate_timeout).to be <= 0.2.seconds
+ end
+
describe '.execute' do
describe 'setting query `max_complexity` and `max_depth`' do
subject(:result) { described_class.execute('query', **kwargs).query }
@@ -195,6 +199,36 @@ RSpec.describe GitlabSchema do
end
end
+ describe 'validate_max_errors' do
+ it 'reports at most 5 errors' do
+ query = <<~GQL
+ query {
+ currentUser {
+ x: id
+ x: bot
+ x: username
+ x: state
+ x: name
+
+ x: id
+ x: bot
+ x: username
+ x: state
+ x: name
+
+ badField
+ veryBadField
+ alsoNotAGoodField
+ }
+ }
+ GQL
+
+ result = described_class.execute(query)
+
+ expect(result.to_h['errors'].count).to eq 5
+ end
+ end
+
describe '.parse_gid' do
let_it_be(:global_id) { 'gid://gitlab/TestOne/2147483647' }
diff --git a/spec/models/namespace/traversal_hierarchy_spec.rb b/spec/models/namespace/traversal_hierarchy_spec.rb
index 2cd66f42458..d7b0ee888c0 100644
--- a/spec/models/namespace/traversal_hierarchy_spec.rb
+++ b/spec/models/namespace/traversal_hierarchy_spec.rb
@@ -3,7 +3,7 @@
require 'spec_helper'
RSpec.describe Namespace::TraversalHierarchy, type: :model do
- let_it_be(:root, reload: true) { create(:group, :with_hierarchy) }
+ let!(:root) { create(:group, :with_hierarchy) }
describe '.for_namespace' do
let(:hierarchy) { described_class.for_namespace(group) }
@@ -62,7 +62,12 @@ RSpec.describe Namespace::TraversalHierarchy, type: :model do
it { expect(hierarchy.incorrect_traversal_ids).to be_empty }
- it_behaves_like 'hierarchy with traversal_ids'
+ it_behaves_like 'hierarchy with traversal_ids' do
+ before do
+ subject
+ end
+ end
+
it_behaves_like 'locked row' do
let(:recorded_queries) { ActiveRecord::QueryRecorder.new }
let(:row) { root }
diff --git a/spec/support/helpers/graphql_helpers.rb b/spec/support/helpers/graphql_helpers.rb
index 6f17d3cb496..065dea7fd5d 100644
--- a/spec/support/helpers/graphql_helpers.rb
+++ b/spec/support/helpers/graphql_helpers.rb
@@ -374,6 +374,7 @@ module GraphqlHelpers
allow_unlimited_graphql_depth if max_depth > 1
allow_high_graphql_recursion
allow_high_graphql_transaction_threshold
+ allow_high_graphql_query_size
type = class_name.respond_to?(:kind) ? class_name : GitlabSchema.types[class_name.to_s]
raise "#{class_name} is not a known type in the GitlabSchema" unless type
@@ -625,6 +626,10 @@ module GraphqlHelpers
stub_const("Gitlab::QueryLimiting::Transaction::THRESHOLD", 1000)
end
+ def allow_high_graphql_query_size
+ stub_const('GraphqlController::MAX_QUERY_SIZE', 10_000_000)
+ end
+
def node_array(data, extract_attribute = nil)
data.map do |item|
extract_attribute ? item['node'][extract_attribute] : item['node']
diff --git a/spec/support/shared_examples/controllers/wiki_actions_shared_examples.rb b/spec/support/shared_examples/controllers/wiki_actions_shared_examples.rb
index e8f7e62d0d7..30710e43357 100644
--- a/spec/support/shared_examples/controllers/wiki_actions_shared_examples.rb
+++ b/spec/support/shared_examples/controllers/wiki_actions_shared_examples.rb
@@ -299,7 +299,7 @@ RSpec.shared_examples 'wiki controller actions' do
expect(response.headers['Content-Disposition']).to match(/^inline/)
expect(response.headers[Gitlab::Workhorse::DETECT_HEADER]).to eq('true')
expect(response.cache_control[:public]).to be(false)
- expect(response.headers['Cache-Control']).to eq('no-store')
+ expect(response.headers['Cache-Control']).to eq('private, no-store')
end
end
end
diff --git a/yarn.lock b/yarn.lock
index b27026f47fd..72f7ddd3832 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1346,15 +1346,15 @@
resolved "https://registry.yarnpkg.com/@popperjs/core/-/core-2.9.2.tgz#adea7b6953cbb34651766b0548468e743c6a2353"
integrity sha512-VZMYa7+fXHdwIq1TDhSXoVmSPEGM/aa+6Aiq3nVVJ9bXr24zScr+NlKFKC3iPljA7ho/GAZr+d2jOf5GIRC30Q==
-"@rails/actioncable@6.1.3-2":
- version "6.1.3-2"
- resolved "https://registry.yarnpkg.com/@rails/actioncable/-/actioncable-6.1.3-2.tgz#de22e2d7474dcca051f7060829450412a17ecc04"
- integrity sha512-3mBLDwM85oj0Ot+wgC3c0wsfx5qvf8XJwSbkJk4ZqW4bA7ctn8BFW+cRQxrnQau+NDfmJvSECY8mmNIANcpULA==
-
-"@rails/ujs@6.1.3-2":
- version "6.1.3-2"
- resolved "https://registry.yarnpkg.com/@rails/ujs/-/ujs-6.1.3-2.tgz#5d7e161e7061654e738a116a7ec8b58b51721a11"
- integrity sha512-Nd0Im4cW8tIX8ZR3jE/dS3wnJrN46RJSdCfU59Cji2puctIWohq63LjKFMufUwm21bCasISNGoLdkr3S7nwONw==
+"@rails/actioncable@6.1.4-1":
+ version "6.1.4-1"
+ resolved "https://registry.yarnpkg.com/@rails/actioncable/-/actioncable-6.1.4-1.tgz#69982e7f352d732f71fda0cc01b7ba8269c9945b"
+ integrity sha512-b6sLoMop3gX22Wm2P5LPpKcZGwsf1ZoAGS+g1HrTrdlsZ/ENOKIBiSNnHOJajHwcYlF0TefBs7e7jIYZHVYihQ==
+
+"@rails/ujs@6.1.4-1":
+ version "6.1.4-1"
+ resolved "https://registry.yarnpkg.com/@rails/ujs/-/ujs-6.1.4-1.tgz#37507fe288a1c7c3a593602aa4dea42e5cb5797f"
+ integrity sha512-Fewm2wHk1n6Kf4E86dzzHDJOFg4EWcSHH3FsMEGs59bTdmf7099mjkOssOQtBqju4R39iaAOQNui7r8P+Q5Dgg==
"@sentry/browser@5.30.0":
version "5.30.0"