diff options
author | Starfall <us@starfall.systems> | 2021-01-26 16:42:38 -0600 |
---|---|---|
committer | Starfall <us@starfall.systems> | 2021-01-26 16:42:38 -0600 |
commit | 3ef928029d94a2b3c6abf96a2935de85c4eed6c8 (patch) | |
tree | d8697b527a0a42e51634b1fef68f0162fe2ccbe2 /config | |
parent | 65263e6309fb4dea1a93d4b4806af629d317c156 (diff) | |
parent | 52ff3ca675ecac0ff32990b6321fb5e349e6dc59 (diff) |
Merge remote-tracking branch 'glitchsoc/main' into main
Diffstat (limited to 'config')
-rw-r--r-- | config/deploy.rb | 2 | ||||
-rw-r--r-- | config/initializers/open_uri_redirection.rb | 2 | ||||
-rw-r--r-- | config/initializers/rack_attack.rb | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/config/deploy.rb b/config/deploy.rb index 5d6873588..c0d72f48f 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -lock '3.14.1' +lock '3.15.0' set :repo_url, ENV.fetch('REPO', 'https://github.com/tootsuite/mastodon.git') set :branch, ENV.fetch('BRANCH', 'master') diff --git a/config/initializers/open_uri_redirection.rb b/config/initializers/open_uri_redirection.rb index e9de85bdc..0e57c53c6 100644 --- a/config/initializers/open_uri_redirection.rb +++ b/config/initializers/open_uri_redirection.rb @@ -3,6 +3,6 @@ require 'open-uri' module OpenURI def self.redirectable?(uri1, uri2) # :nodoc: uri1.scheme.casecmp(uri2.scheme).zero? || - (/\A(?:http|https|ftp)\z/i =~ uri1.scheme && /\A(?:http|https|ftp)\z/i =~ uri2.scheme) + (/\A(?:http|https|ftp)\z/i.match?(uri1.scheme) && /\A(?:http|https|ftp)\z/i.match?(uri2.scheme)) end end diff --git a/config/initializers/rack_attack.rb b/config/initializers/rack_attack.rb index 6662ef40b..c0db49907 100644 --- a/config/initializers/rack_attack.rb +++ b/config/initializers/rack_attack.rb @@ -78,7 +78,7 @@ class Rack::Attack API_DELETE_STATUS_REGEX = /\A\/api\/v1\/statuses\/[\d]+/.freeze throttle('throttle_api_delete', limit: 30, period: 30.minutes) do |req| - req.authenticated_user_id if (req.post? && req.path =~ API_DELETE_REBLOG_REGEX) || (req.delete? && req.path =~ API_DELETE_STATUS_REGEX) + req.authenticated_user_id if (req.post? && req.path.match?(API_DELETE_REBLOG_REGEX)) || (req.delete? && req.path.match?(API_DELETE_STATUS_REGEX)) end throttle('throttle_sign_up_attempts/ip', limit: 25, period: 5.minutes) do |req| |