2016-11-16 02:56:29 +11:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2016-02-21 08:53:20 +11:00
|
|
|
source 'https://rubygems.org'
|
2021-05-06 22:22:54 +10:00
|
|
|
ruby '>= 2.5.0', '< 3.1.0'
|
2016-02-21 08:53:20 +11:00
|
|
|
|
2019-10-28 22:48:08 +11:00
|
|
|
gem 'pkg-config', '~> 1.4'
|
2021-11-19 07:59:57 +11:00
|
|
|
gem 'rexml', '~> 3.2'
|
2017-04-14 19:15:03 +10:00
|
|
|
|
2021-10-09 21:39:55 +11:00
|
|
|
gem 'puma', '~> 5.5'
|
2021-07-04 06:07:32 +10:00
|
|
|
gem 'rails', '~> 6.1.4'
|
2020-01-05 08:48:34 +11:00
|
|
|
gem 'sprockets', '~> 3.7.2'
|
2021-01-27 01:35:03 +11:00
|
|
|
gem 'thor', '~> 1.1'
|
2020-06-17 14:30:57 +10:00
|
|
|
gem 'rack', '~> 2.2.3'
|
2016-02-21 08:53:20 +11:00
|
|
|
|
2017-05-11 19:27:01 +10:00
|
|
|
gem 'hamlit-rails', '~> 0.2'
|
2019-12-31 02:21:51 +11:00
|
|
|
gem 'pg', '~> 1.2'
|
2021-01-24 01:25:08 +11:00
|
|
|
gem 'makara', '~> 0.5'
|
2021-03-15 18:09:47 +11:00
|
|
|
gem 'pghero', '~> 2.8'
|
2019-02-26 01:55:53 +11:00
|
|
|
gem 'dotenv-rails', '~> 2.7'
|
2016-02-21 08:53:20 +11:00
|
|
|
|
2021-12-21 11:19:29 +11:00
|
|
|
gem 'aws-sdk-s3', '~> 1.109', require: false
|
2018-10-23 01:58:36 +11:00
|
|
|
gem 'fog-core', '<= 2.1.0'
|
|
|
|
gem 'fog-openstack', '~> 0.3', require: false
|
2021-09-30 07:52:36 +10:00
|
|
|
gem 'kt-paperclip', '~> 7.0'
|
2019-04-27 11:24:09 +10:00
|
|
|
gem 'blurhash', '~> 0.1'
|
2016-02-21 08:53:20 +11:00
|
|
|
|
2017-07-07 12:02:06 +10:00
|
|
|
gem 'active_model_serializers', '~> 0.10'
|
2021-07-08 15:35:20 +10:00
|
|
|
gem 'addressable', '~> 2.8'
|
2021-11-27 08:03:35 +11:00
|
|
|
gem 'bootsnap', '~> 1.9.2', require: false
|
2017-06-26 00:54:30 +10:00
|
|
|
gem 'browser'
|
2019-11-27 13:53:50 +11:00
|
|
|
gem 'charlock_holmes', '~> 0.7.7'
|
2017-09-08 20:32:22 +10:00
|
|
|
gem 'iso-639'
|
2021-11-19 08:02:08 +11:00
|
|
|
gem 'chewy', '~> 7.2'
|
2021-11-29 17:19:22 +11:00
|
|
|
gem 'cld3', '~> 3.4.3'
|
2021-05-07 13:27:58 +10:00
|
|
|
gem 'devise', '~> 4.8'
|
2021-04-10 19:50:41 +10:00
|
|
|
gem 'devise-two-factor', '~> 4.0'
|
2018-02-02 20:18:55 +11:00
|
|
|
|
2018-03-20 06:08:56 +11:00
|
|
|
group :pam_authentication, optional: true do
|
2018-09-15 01:42:45 +10:00
|
|
|
gem 'devise_pam_authenticatable2', '~> 9.2'
|
2018-03-20 06:08:56 +11:00
|
|
|
end
|
2018-04-08 05:36:58 +10:00
|
|
|
|
2020-12-30 01:32:37 +11:00
|
|
|
gem 'net-ldap', '~> 0.17'
|
2020-11-20 03:43:58 +11:00
|
|
|
gem 'omniauth-cas', '~> 2.0'
|
2018-03-07 12:25:17 +11:00
|
|
|
gem 'omniauth-saml', '~> 1.10'
|
2018-12-17 20:15:14 +11:00
|
|
|
gem 'omniauth', '~> 1.9'
|
2020-11-28 15:17:53 +11:00
|
|
|
gem 'omniauth-rails_csrf_protection', '~> 0.1'
|
2018-02-02 20:18:55 +11:00
|
|
|
|
2020-07-06 02:28:25 +10:00
|
|
|
gem 'color_diff', '~> 0.1'
|
2020-03-26 08:48:52 +11:00
|
|
|
gem 'discard', '~> 1.2'
|
2021-02-24 08:58:39 +11:00
|
|
|
gem 'doorkeeper', '~> 5.5'
|
2020-06-03 03:24:53 +10:00
|
|
|
gem 'ed25519', '~> 1.2'
|
2017-05-11 19:27:01 +10:00
|
|
|
gem 'fast_blank', '~> 1.0'
|
2018-02-21 13:40:12 +11:00
|
|
|
gem 'fastimage'
|
2017-05-11 19:27:01 +10:00
|
|
|
gem 'hiredis', '~> 0.6'
|
2020-08-25 21:57:44 +10:00
|
|
|
gem 'redis-namespace', '~> 1.8'
|
2017-05-11 19:27:01 +10:00
|
|
|
gem 'htmlentities', '~> 4.3'
|
2021-08-29 02:17:59 +10:00
|
|
|
gem 'http', '~> 5.0'
|
2017-05-11 19:27:01 +10:00
|
|
|
gem 'http_accept_language', '~> 2.1'
|
2021-05-29 10:17:23 +10:00
|
|
|
gem 'httplog', '~> 1.5.0'
|
2017-07-16 01:24:35 +10:00
|
|
|
gem 'idn-ruby', require: 'idn'
|
2020-05-04 21:53:42 +10:00
|
|
|
gem 'kaminari', '~> 1.2'
|
2017-05-11 19:27:01 +10:00
|
|
|
gem 'link_header', '~> 0.0'
|
2021-11-18 11:44:08 +11:00
|
|
|
gem 'mime-types', '~> 3.4.1', require: 'mime/types/columnar'
|
2021-08-07 14:01:59 +10:00
|
|
|
gem 'nokogiri', '~> 1.12'
|
2021-04-13 11:45:45 +10:00
|
|
|
gem 'nsa', '~> 0.2'
|
2021-08-17 14:58:07 +10:00
|
|
|
gem 'oj', '~> 3.13'
|
2020-12-30 02:08:06 +11:00
|
|
|
gem 'ox', '~> 2.14'
|
2019-07-27 12:42:08 +10:00
|
|
|
gem 'parslet'
|
2020-07-29 01:59:29 +10:00
|
|
|
gem 'posix-spawn'
|
2019-08-19 23:36:45 +10:00
|
|
|
gem 'pundit', '~> 2.1'
|
2018-01-16 13:29:11 +11:00
|
|
|
gem 'premailer-rails'
|
2021-02-11 22:58:46 +11:00
|
|
|
gem 'rack-attack', '~> 6.5'
|
2019-11-27 13:59:57 +11:00
|
|
|
gem 'rack-cors', '~> 1.1', require: 'rack/cors'
|
2021-03-24 20:44:31 +11:00
|
|
|
gem 'rails-i18n', '~> 6.0'
|
2017-05-11 19:27:01 +10:00
|
|
|
gem 'rails-settings-cached', '~> 0.6'
|
2021-10-20 11:49:36 +11:00
|
|
|
gem 'redis', '~> 4.5', require: ['redis', 'redis/connection/hiredis']
|
2017-07-19 22:44:04 +10:00
|
|
|
gem 'mario-redis-lock', '~> 1.2', require: 'redis_lock'
|
2021-08-31 21:58:34 +10:00
|
|
|
gem 'rqrcode', '~> 2.1'
|
2021-01-05 04:10:33 +11:00
|
|
|
gem 'ruby-progressbar', '~> 1.11'
|
2021-08-10 04:46:57 +10:00
|
|
|
gem 'sanitize', '~> 6.0'
|
2020-12-14 19:06:34 +11:00
|
|
|
gem 'scenic', '~> 1.5'
|
2021-11-13 20:48:34 +11:00
|
|
|
gem 'sidekiq', '~> 6.3'
|
2021-06-11 00:46:18 +10:00
|
|
|
gem 'sidekiq-scheduler', '~> 3.1'
|
2021-07-01 01:45:49 +10:00
|
|
|
gem 'sidekiq-unique-jobs', '~> 7.1'
|
2018-11-22 22:47:36 +11:00
|
|
|
gem 'sidekiq-bulk', '~>0.2.0'
|
2021-05-22 01:52:32 +10:00
|
|
|
gem 'simple-navigation', '~> 4.3'
|
2021-02-19 20:09:30 +11:00
|
|
|
gem 'simple_form', '~> 5.1'
|
2021-11-18 11:06:40 +11:00
|
|
|
gem 'sprockets-rails', '~> 3.4', require: 'sprockets/railtie'
|
2020-07-28 04:00:35 +10:00
|
|
|
gem 'stoplight', '~> 2.2.1'
|
2020-07-29 03:18:59 +10:00
|
|
|
gem 'strong_migrations', '~> 0.7'
|
2020-12-30 02:08:23 +11:00
|
|
|
gem 'tty-prompt', '~> 0.23', require: false
|
2021-03-02 22:02:56 +11:00
|
|
|
gem 'twitter-text', '~> 3.1.0'
|
2021-01-27 01:34:48 +11:00
|
|
|
gem 'tzinfo-data', '~> 1.2021'
|
2021-05-27 18:48:18 +10:00
|
|
|
gem 'webpacker', '~> 5.4'
|
2021-04-12 22:25:34 +10:00
|
|
|
gem 'webpush', '~> 0.3'
|
Add WebAuthn as an alternative 2FA method (#14466)
* feat: add possibility of adding WebAuthn security keys to use as 2FA
This adds a basic UI for enabling WebAuthn 2FA. We did a little refactor
to the Settings page for editing the 2FA methods – now it will list the
methods that are available to the user (TOTP and WebAuthn) and from
there they'll be able to add or remove any of them.
Also, it's worth mentioning that for enabling WebAuthn it's required to
have TOTP enabled, so the first time that you go to the 2FA Settings
page, you'll be asked to set it up.
This work was inspired by the one donde by Github in their platform, and
despite it could be approached in different ways, we decided to go with
this one given that we feel that this gives a great UX.
Co-authored-by: Facundo Padula <facundo.padula@cedarcode.com>
* feat: add request for WebAuthn as second factor at login if enabled
This commits adds the feature for using WebAuthn as a second factor for
login when enabled.
If users have WebAuthn enabled, now a page requesting for the use of a
WebAuthn credential for log in will appear, although a link redirecting
to the old page for logging in using a two-factor code will also be
present.
Co-authored-by: Facundo Padula <facundo.padula@cedarcode.com>
* feat: add possibility of deleting WebAuthn Credentials
Co-authored-by: Facundo Padula <facundo.padula@cedarcode.com>
* feat: disable WebAuthn when an Admin disables 2FA for a user
Co-authored-by: Facundo Padula <facundo.padula@cedarcode.com>
* feat: remove ability to disable TOTP leaving only WebAuthn as 2FA
Following examples form other platforms like Github, we decided to make
Webauthn 2FA secondary to 2FA with TOTP, so that we removed the
possibility of removing TOTP authentication only, leaving users with
just WEbAuthn as 2FA. Instead, users will have to click on 'Disable 2FA'
in order to remove second factor auth.
The reason for WebAuthn being secondary to TOPT is that in that way,
users will still be able to log in using their code from their phone's
application if they don't have their security keys with them – or maybe
even lost them.
* We had to change a little the flow for setting up TOTP, given that now
it's possible to setting up again if you already had TOTP, in order to
let users modify their authenticator app – given that now it's not
possible for them to disable TOTP and set it up again with another
authenticator app.
So, basically, now instead of storing the new `otp_secret` in the
user, we store it in the session until the process of set up is
finished.
This was because, as it was before, when users clicked on 'Edit' in
the new two-factor methods lists page, but then went back without
finishing the flow, their `otp_secret` had been changed therefore
invalidating their previous authenticator app, making them unable to
log in again using TOTP.
Co-authored-by: Facundo Padula <facundo.padula@cedarcode.com>
* refactor: fix eslint errors
The PR build was failing given that linting returning some errors.
This commit attempts to fix them.
* refactor: normalize i18n translations
The build was failing given that i18n translations files were not
normalized.
This commits fixes that.
* refactor: avoid having the webauthn gem locked to a specific version
* refactor: use symbols for routes without '/'
* refactor: avoid sending webauthn disabled email when 2FA is disabled
When an admins disable 2FA for users, we were sending two mails
to them, one notifying that 2FA was disabled and the other to notify
that WebAuthn was disabled.
As the second one is redundant since the first email includes it, we can
remove it and send just one email to users.
* refactor: avoid creating new env variable for webauthn_origin config
* refactor: improve flash error messages for webauthn pages
Co-authored-by: Facundo Padula <facundo.padula@cedarcode.com>
2020-08-25 00:46:27 +10:00
|
|
|
gem 'webauthn', '~> 3.0.0.alpha1'
|
2016-02-21 08:53:20 +11:00
|
|
|
|
2020-01-14 05:01:43 +11:00
|
|
|
gem 'json-ld'
|
2020-02-10 23:26:53 +11:00
|
|
|
gem 'json-ld-preloaded', '~> 3.1'
|
2020-01-11 09:02:16 +11:00
|
|
|
gem 'rdf-normalize', '~> 0.4'
|
2017-08-26 21:47:38 +10:00
|
|
|
|
2016-02-21 08:53:20 +11:00
|
|
|
group :development, :test do
|
2021-03-31 01:47:06 +11:00
|
|
|
gem 'fabrication', '~> 2.22'
|
2019-11-12 00:05:16 +11:00
|
|
|
gem 'fuubar', '~> 2.5'
|
2018-10-30 11:06:47 +11:00
|
|
|
gem 'i18n-tasks', '~> 0.9', require: false
|
2020-05-09 02:52:57 +10:00
|
|
|
gem 'pry-byebug', '~> 3.9'
|
2017-05-11 19:27:01 +10:00
|
|
|
gem 'pry-rails', '~> 0.3'
|
2021-03-16 09:55:43 +11:00
|
|
|
gem 'rspec-rails', '~> 5.0'
|
2016-02-25 10:17:01 +11:00
|
|
|
end
|
|
|
|
|
2018-02-25 05:16:11 +11:00
|
|
|
group :production, :test do
|
2018-09-21 08:42:59 +10:00
|
|
|
gem 'private_address_check', '~> 0.5'
|
2018-02-25 05:16:11 +11:00
|
|
|
end
|
|
|
|
|
2016-02-25 10:17:01 +11:00
|
|
|
group :test do
|
2021-10-28 12:20:19 +11:00
|
|
|
gem 'capybara', '~> 3.36'
|
2017-06-01 01:09:17 +10:00
|
|
|
gem 'climate_control', '~> 0.2'
|
2021-08-27 22:47:00 +10:00
|
|
|
gem 'faker', '~> 2.19'
|
2020-01-05 08:48:34 +11:00
|
|
|
gem 'microformats', '~> 4.2'
|
2017-05-11 19:27:01 +10:00
|
|
|
gem 'rails-controller-testing', '~> 1.0'
|
2020-06-25 18:47:34 +10:00
|
|
|
gem 'rspec-sidekiq', '~> 3.1'
|
2021-01-05 04:10:10 +11:00
|
|
|
gem 'simplecov', '~> 0.21', require: false
|
2021-08-17 13:49:00 +10:00
|
|
|
gem 'webmock', '~> 3.14'
|
2020-05-02 04:19:01 +10:00
|
|
|
gem 'rspec_junit_formatter', '~> 0.4'
|
2016-02-21 08:53:20 +11:00
|
|
|
end
|
|
|
|
|
|
|
|
group :development do
|
2020-10-22 14:11:20 +11:00
|
|
|
gem 'active_record_query_trace', '~> 1.8'
|
2020-04-10 04:32:39 +10:00
|
|
|
gem 'annotate', '~> 3.1'
|
2020-11-11 01:11:15 +11:00
|
|
|
gem 'better_errors', '~> 2.9'
|
2021-01-07 16:10:49 +11:00
|
|
|
gem 'binding_of_caller', '~> 1.0'
|
2020-01-07 01:02:46 +11:00
|
|
|
gem 'bullet', '~> 6.1'
|
2018-12-11 16:34:02 +11:00
|
|
|
gem 'letter_opener', '~> 1.7'
|
2021-11-18 11:20:31 +11:00
|
|
|
gem 'letter_opener_web', '~> 2.0'
|
2018-02-22 09:21:32 +11:00
|
|
|
gem 'memory_profiler'
|
2021-11-18 11:06:26 +11:00
|
|
|
gem 'rubocop', '~> 1.23', require: false
|
2021-09-14 22:14:25 +10:00
|
|
|
gem 'rubocop-rails', '~> 2.12', require: false
|
2021-08-01 12:13:41 +10:00
|
|
|
gem 'brakeman', '~> 5.1', require: false
|
2021-09-19 15:44:27 +10:00
|
|
|
gem 'bundler-audit', '~> 0.9', require: false
|
2017-01-31 06:03:17 +11:00
|
|
|
|
2021-03-05 08:38:52 +11:00
|
|
|
gem 'capistrano', '~> 3.16'
|
2020-07-28 13:24:53 +10:00
|
|
|
gem 'capistrano-rails', '~> 1.6'
|
2020-07-28 04:24:09 +10:00
|
|
|
gem 'capistrano-rbenv', '~> 2.2'
|
2017-05-11 19:27:01 +10:00
|
|
|
gem 'capistrano-yarn', '~> 2.0'
|
2018-05-03 02:58:48 +10:00
|
|
|
|
|
|
|
gem 'stackprof'
|
2016-02-21 08:53:20 +11:00
|
|
|
end
|
|
|
|
|
|
|
|
group :production do
|
2019-04-21 12:49:05 +10:00
|
|
|
gem 'lograge', '~> 0.11'
|
2016-02-21 08:53:20 +11:00
|
|
|
end
|
2019-01-15 19:24:35 +11:00
|
|
|
|
|
|
|
gem 'concurrent-ruby', require: false
|
2019-07-02 08:34:38 +10:00
|
|
|
gem 'connection_pool', require: false
|
Add follower synchronization mechanism (#14510)
* Add support for followers synchronization on the receiving end
Check the `collectionSynchronization` attribute on `Create` and `Announce`
activities and synchronize followers from provided collection if possible.
* Add tests for followers synchronization on the receiving end
* Add support for follower synchronization on the sender's end
* Add tests for the sending end
* Switch from AS attributes to HTTP header
Replace the custom `collectionSynchronization` ActivityStreams attribute by
an HTTP header (`X-AS-Collection-Synchronization`) with the same syntax as
the `Signature` header and the following fields:
- `collectionId` to specify which collection to synchronize
- `digest` for the SHA256 hex-digest of the list of followers known on the
receiving instance (where “receiving instance” is determined by accounts
sharing the same host name for their ActivityPub actor `id`)
- `url` of a collection that should be fetched by the instance actor
Internally, move away from the webfinger-based `domain` attribute and use
account `uri` prefix to group accounts.
* Add environment variable to disable followers synchronization
Since the whole mechanism relies on some new preconditions that, in some
extremely rare cases, might not be met, add an environment variable
(DISABLE_FOLLOWERS_SYNCHRONIZATION) to disable the mechanism altogether and
avoid followers being incorrectly removed.
The current conditions are:
1. all managed accounts' actor `id` and inbox URL have the same URI scheme and
netloc.
2. all accounts whose actor `id` or inbox URL share the same URI scheme and
netloc as a managed account must be managed by the same Mastodon instance
as well.
As far as Mastodon is concerned, breaking those preconditions require extensive
configuration changes in the reverse proxy and might also cause other issues.
Therefore, this environment variable provides a way out for people with highly
unusual configurations, and can be safely ignored for the overwhelming majority
of Mastodon administrators.
* Only set follower synchronization header on non-public statuses
This is to avoid unnecessary computations and allow Follow-related
activities to be handled by the usual codepath instead of going through
the synchronization mechanism (otherwise, any Follow/Undo/Accept activity
would trigger the synchronization mechanism even if processing the activity
itself would be enough to re-introduce synchronization)
* Change how ActivityPub::SynchronizeFollowersService handles follow requests
If the remote lists a local follower which we only know has sent a follow
request, consider the follow request as accepted instead of sending an Undo.
* Integrate review feeback
- rename X-AS-Collection-Synchronization to Collection-Synchronization
- various minor refactoring and code style changes
* Only select required fields when computing followers_hash
* Use actor URI rather than webfinger domain in synchronization endpoint
* Change hash computation to be a XOR of individual hashes
Makes it much easier to be memory-efficient, and avoid sorting discrepancy issues.
* Marginally improve followers_hash computation speed
* Further improve hash computation performances by using pluck_each
2020-10-22 03:04:09 +11:00
|
|
|
|
|
|
|
gem 'xorcist', '~> 1.1'
|