Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
cdf566e8
Commit
cdf566e8
authored
Mar 28, 2022
by
John Mason
Committed by
Dylan Griffith
Mar 28, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change default search rate limits
Changelog: changed
parent
006df6a3
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
30 additions
and
2 deletions
+30
-2
db/migrate/20220322205004_change_search_rate_limit_default_values.rb
...20220322205004_change_search_rate_limit_default_values.rb
+8
-0
db/post_migrate/20220322205008_change_search_rate_limit_values.rb
...migrate/20220322205008_change_search_rate_limit_values.rb
+18
-0
db/schema_migrations/20220322205004
db/schema_migrations/20220322205004
+1
-0
db/schema_migrations/20220322205008
db/schema_migrations/20220322205008
+1
-0
db/structure.sql
db/structure.sql
+2
-2
No files found.
db/migrate/20220322205004_change_search_rate_limit_default_values.rb
0 → 100644
View file @
cdf566e8
# frozen_string_literal: true
class
ChangeSearchRateLimitDefaultValues
<
Gitlab
::
Database
::
Migration
[
1.0
]
def
change
change_column_default
:application_settings
,
:search_rate_limit
,
from:
30
,
to:
300
change_column_default
:application_settings
,
:search_rate_limit_unauthenticated
,
from:
10
,
to:
100
end
end
db/post_migrate/20220322205008_change_search_rate_limit_values.rb
0 → 100644
View file @
cdf566e8
# frozen_string_literal: true
class
ChangeSearchRateLimitValues
<
Gitlab
::
Database
::
Migration
[
1.0
]
def
up
# Change search_rate_limits to a more reasonable value
# as long as they are still using the default values.
#
# The reason why `search_rate_limit` could be either 30 or 60
# is because its value was ported over from the now deprecated
# `user_email_lookup_limit` which had a default value of 60.
execute
(
"update application_settings set search_rate_limit=300 where search_rate_limit IN (30,60)"
)
execute
(
"update application_settings set search_rate_limit_unauthenticated=100 where search_rate_limit_unauthenticated = 10"
)
end
def
down
# noop. Because this migration is updating values, it is not reversible.
end
end
db/schema_migrations/20220322205004
0 → 100644
View file @
cdf566e8
af69da66a3deb250494204fecf4bc91b4fd10f529ab766746ae98072f54bf245
\ No newline at end of file
db/schema_migrations/20220322205008
0 → 100644
View file @
cdf566e8
465de916b1c951287a101da37156fb0f59a4bd1cb4ab7076dc48e07e326fa4e4
\ No newline at end of file
db/structure.sql
View file @
cdf566e8
...
...
@@ -11251,8 +11251,8 @@ CREATE TABLE application_settings (
users_get_by_id_limit integer DEFAULT 300 NOT NULL,
users_get_by_id_limit_allowlist text[] DEFAULT '{}'::text[] NOT NULL,
container_registry_expiration_policies_caching boolean DEFAULT true NOT NULL,
search_rate_limit integer DEFAULT 30 NOT NULL,
search_rate_limit_unauthenticated integer DEFAULT 10 NOT NULL,
search_rate_limit integer DEFAULT 30
0
NOT NULL,
search_rate_limit_unauthenticated integer DEFAULT 10
0
NOT NULL,
encrypted_database_grafana_api_key bytea,
encrypted_database_grafana_api_key_iv bytea,
database_grafana_api_url text,
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment