Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Mastodon kif.rocks edition
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FS Info TU Dortmund
Administration
Mastodon kif.rocks edition
Commits
5140f31c
Unverified
Commit
5140f31c
authored
4 months ago
by
Claire
Committed by
GitHub
4 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Merge commit from fork
parent
b1a584d2
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
config/initializers/rack_attack.rb
+9
-1
9 additions, 1 deletion
config/initializers/rack_attack.rb
with
9 additions
and
1 deletion
config/initializers/rack_attack.rb
+
9
−
1
View file @
5140f31c
...
...
@@ -122,7 +122,7 @@ class Rack::Attack
end
throttle
(
'throttle_email_confirmations/ip'
,
limit:
25
,
period:
5
.
minutes
)
do
|
req
|
req
.
throttleable_remote_ip
if
req
.
post?
&&
(
req
.
path_matches?
(
'/auth/confirmation'
)
||
req
.
path
==
'/api/v1/emails/confirmations'
)
req
.
throttleable_remote_ip
if
(
req
.
post?
&&
(
req
.
path_matches?
(
'/auth/confirmation'
)
||
req
.
path
==
'/api/v1/emails/confirmations'
)
)
||
((
req
.
put?
||
req
.
patch?
)
&&
req
.
path_matches?
(
'/auth/setup'
))
end
throttle
(
'throttle_email_confirmations/email'
,
limit:
5
,
period:
30
.
minutes
)
do
|
req
|
...
...
@@ -133,6 +133,14 @@ class Rack::Attack
end
end
throttle
(
'throttle_auth_setup/email'
,
limit:
5
,
period:
10
.
minutes
)
do
|
req
|
req
.
params
.
dig
(
'user'
,
'email'
).
presence
if
(
req
.
put?
||
req
.
patch?
)
&&
req
.
path_matches?
(
'/auth/setup'
)
end
throttle
(
'throttle_auth_setup/account'
,
limit:
5
,
period:
10
.
minutes
)
do
|
req
|
req
.
warden_user_id
if
(
req
.
put?
||
req
.
patch?
)
&&
req
.
path_matches?
(
'/auth/setup'
)
end
throttle
(
'throttle_login_attempts/ip'
,
limit:
25
,
period:
5
.
minutes
)
do
|
req
|
req
.
throttleable_remote_ip
if
req
.
post?
&&
req
.
path_matches?
(
'/auth/sign_in'
)
end
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment