diff --git a/.dockerignore b/.dockerignore index 2ddfa9b953..5cd3b179a5 100644 --- a/.dockerignore +++ b/.dockerignore @@ -4,7 +4,6 @@ public/system public/assets public/packs node_modules -storybook neo4j vendor/bundle .DS_Store diff --git a/.env.production.sample b/.env.production.sample index eb1c5a48f5..1d8a177aa2 100644 --- a/.env.production.sample +++ b/.env.production.sample @@ -69,7 +69,7 @@ SMTP_FROM_ADDRESS=notifications@example.com #SMTP_CA_FILE=/etc/ssl/certs/ca-certificates.crt #SMTP_OPENSSL_VERIFY_MODE=peer #SMTP_ENABLE_STARTTLS_AUTO=true - +#SMTP_TLS=true # Optional user upload path and URL (images, avatars). Default is :rails_root/public/system. If you set this variable, you are responsible for making your HTTP server (eg. nginx) serve these files. # PAPERCLIP_ROOT_PATH=/var/lib/mastodon/public-system diff --git a/.eslintrc.yml b/.eslintrc.yml index a816bffeff..fd2ba46dd0 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -112,7 +112,7 @@ rules: jsx-a11y/iframe-has-title: warn jsx-a11y/img-has-alt: warn jsx-a11y/img-redundant-alt: warn - jsx-a11y/label-has-for: warn + jsx-a11y/label-has-for: off jsx-a11y/mouse-events-have-key-events: warn jsx-a11y/no-access-key: warn jsx-a11y/no-distracting-elements: warn @@ -121,6 +121,6 @@ rules: jsx-a11y/onclick-has-focus: warn jsx-a11y/onclick-has-role: warn jsx-a11y/role-has-required-aria-props: warn - jsx-a11y/role-supports-aria-props: warn + jsx-a11y/role-supports-aria-props: off jsx-a11y/scope: warn jsx-a11y/tabindex-no-positive: warn diff --git a/.gitignore b/.gitignore index 868a843682..38ebc934f2 100644 --- a/.gitignore +++ b/.gitignore @@ -21,7 +21,6 @@ public/system public/assets public/packs public/packs-test -public/sw.js .env .env.production node_modules/ diff --git a/.nanoignore b/.nanoignore index f02c0a68ac..80e9397035 100644 --- a/.nanoignore +++ b/.nanoignore @@ -14,7 +14,6 @@ node_modules/ public/assets/ public/system/ spec/ -storybook/ tmp/ .vagrant/ vendor/bundle/ diff --git a/.rubocop.yml b/.rubocop.yml index 1cbdadd49f..ae36971747 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -27,6 +27,7 @@ Metrics/AbcSize: Max: 100 Metrics/BlockLength: + Max: 35 Exclude: - 'lib/tasks/**/*' @@ -35,10 +36,10 @@ Metrics/BlockNesting: Metrics/ClassLength: CountComments: false - Max: 200 + Max: 300 Metrics/CyclomaticComplexity: - Max: 15 + Max: 25 Metrics/LineLength: AllowURI: true @@ -53,11 +54,11 @@ Metrics/ModuleLength: Max: 200 Metrics/ParameterLists: - Max: 4 + Max: 5 CountKeywordArgs: true Metrics/PerceivedComplexity: - Max: 10 + Max: 20 Rails: Enabled: true diff --git a/.slugignore b/.slugignore index b0141b0e2b..5470f6e3f3 100644 --- a/.slugignore +++ b/.slugignore @@ -2,4 +2,3 @@ node_modules/ .cache/ docs/ spec/ -storybook/ diff --git a/Aptfile b/Aptfile index f89f74bd4e..48dff1a770 100644 --- a/Aptfile +++ b/Aptfile @@ -1,7 +1,9 @@ -protobuf-compiler -libprotobuf-dev ffmpeg -libxdamage1 -libxfixes3 libicu-dev +libidn11 libidn11-dev +libpq-dev +libprotobuf-dev +libxdamage1 +libxfixes3 +protobuf-compiler diff --git a/README.md b/README.md index 7d9b6e4ab1..998d570053 100644 --- a/README.md +++ b/README.md @@ -8,4 +8,3 @@ So here's the deal: we all work on this code, and then it runs on dev.glitch.soc - You can view documentation for this project at [glitch-soc.github.io/docs/](https://glitch-soc.github.io/docs/). - And contributing guidelines are available [here](CONTRIBUTING.md) and [here](https://glitch-soc.github.io/docs/contributing/). - diff --git a/app.json b/app.json index a935b8232b..09adaac2c9 100644 --- a/app.json +++ b/app.json @@ -2,7 +2,7 @@ "name": "Mastodon", "description": "A GNU Social-compatible microblogging server", "repository": "https://github.com/tootsuite/mastodon", - "logo": "https://github.com/tootsuite/mastodon/raw/master/app/javascript/images/logo.svg", + "logo": "https://github.com/tootsuite.png", "env": { "HEROKU": { "description": "Leave this as true", diff --git a/app/controllers/settings/two_factor_authentications_controller.rb b/app/controllers/settings/two_factor_authentications_controller.rb index 9834838817..863cc7351b 100644 --- a/app/controllers/settings/two_factor_authentications_controller.rb +++ b/app/controllers/settings/two_factor_authentications_controller.rb @@ -18,7 +18,7 @@ module Settings end def destroy - if current_user.validate_and_consume_otp!(confirmation_params[:code]) + if acceptable_code? current_user.otp_required_for_login = false current_user.save! redirect_to settings_two_factor_authentication_path @@ -38,5 +38,10 @@ module Settings def verify_otp_required redirect_to settings_two_factor_authentication_path if current_user.otp_required_for_login? end + + def acceptable_code? + current_user.validate_and_consume_otp!(confirmation_params[:code]) || + current_user.invalidate_otp_backup_code!(confirmation_params[:code]) + end end end diff --git a/app/helpers/instance_helper.rb b/app/helpers/instance_helper.rb index a1c3c3521f..70027cca91 100644 --- a/app/helpers/instance_helper.rb +++ b/app/helpers/instance_helper.rb @@ -2,7 +2,7 @@ module InstanceHelper def site_title - Setting.site_title.to_s + Setting.site_title.presence || site_hostname end def site_hostname diff --git a/app/javascript/mastodon/components/autosuggest_textarea.js b/app/javascript/mastodon/components/autosuggest_textarea.js index fa41e59e1f..35b37600fe 100644 --- a/app/javascript/mastodon/components/autosuggest_textarea.js +++ b/app/javascript/mastodon/components/autosuggest_textarea.js @@ -162,20 +162,23 @@ export default class AutosuggestTextarea extends ImmutablePureComponent { return (
-