Commit Graph

101 Commits (1d03570080252ee70859f07638ab724fc4fadfc2)

Author SHA1 Message Date
David Roetzel 388d5473e1
Refactor (ruby) redis configuration (#31694) 4 months ago
Matt Jankowski 222ab80557
Fix `Style/GlobalStdStream` cop in environments/* files (#30694) 7 months ago
Matt Jankowski 0e1110c947
Use `SECRET_KEY_BASE_DUMMY` feature as placeholder during asset compilation (#30505) 7 months ago
Nick Schonning 13fb54920b
Enable Style/IfUnlessModifier RuboCop (#30260) 8 months ago
Matt Jankowski 1e7d5d2957
Update `devise-two-factor` to version 5.0.0 (#28325)
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
8 months ago
Matt Jankowski 369b2ef0ed
Fix `Style/TrailingCommaInHashLiteral` cop (#30004) 9 months ago
Matt Jankowski 933189887b
Fix `Style/StringLiterals` cop (#30005) 9 months ago
Matt Jankowski 33cc3ae8fa
Fix `Style/StabbyLambdaParentheses` cop (#27771) 1 year ago
Matt Jankowski 9a3d047f3e
Run `bin/rails app:update` with Rails 7.1 (#27522) 1 year ago
Nick Schonning 85db392464
Autofix Rubocop cops for config/ (#24145) 1 year ago
Matt Jankowski ce43ed144c
Rails 7.0 update (#25668) 2 years ago
Nick Schonning 1d557305d2
Enable Rubocop Style/FrozenStringLiteralComment (#23793) 2 years ago
Eugen Rochko ba06a2f104
Revert "Rails 7 update" (#25667) 2 years ago
Matt Jankowski 50c2a03695
Rails 7 update (#24241) 2 years ago
mogaminsk e0d075713f
Change i18n-fallbacks to English (#24727) 2 years ago
Eugen Rochko 0ca54a4105
Remove `Permissions-Policy` header from all responses (#24124) 2 years ago
Eugen Rochko f0e727f958
Add cache headers to static files served through Rails (#24120) 2 years ago
Eugen Rochko 8cb2543ee5
Add `SENDFILE_HEADER` environment variable (#24123) 2 years ago
Claire 02c6bad3ca
Change unintended SMTP read timeout from 5 seconds to 20 seconds (#23750) 2 years ago
Claire cff7d967f9
Fix CSRF protection (#23037)
Fix regression from #23014
2 years ago
Claire aefefc74c4
Change referrer-policy to no-referrer application-wide (#23014) 2 years ago
Rose 4f15fd0ba1
Fix style for hashes (#20518)
* Fix style for hashes

Make the style for hashes consistent.

* New style

More consistency
2 years ago
Yamagishi Kazutoshi 19a8563905
Fix `ENV` (#20377) 2 years ago
F 9feba112a7
Make enable_starttls configurable by envvars (#20321)
ENABLE_STARTTLS is designed to replace ENABLE_STARTTLS_AUTO by accepting
three values: 'auto' (the default), 'always', and 'never'. If
ENABLE_STARTTLS isn't provided, we fall back to ENABLE_STARTTLS_AUTO. In
this way, this change should be fully backwards compatible.

Resolves #20311
2 years ago
Arya K af9c9936dd
Fix I2P HTTPS redirect (#18929) 2 years ago
Yamagishi Kazutoshi 5781d1db84
Fix parsing `TRUSTED_PROXY_IP` (#18051) 3 years ago
Eugen Rochko 8c03b45fff
Fix unset `SMTP_RETURN_PATH` environment variable causing e-mail not to send (#17982) 3 years ago
Eugen Rochko 56edc6552f
Add `SMTP_RETURN_PATH` environment variable to set bounce domain (#17886) 3 years ago
Wonderfall 244726e2e8
disable legacy XSS filtering (#17289)
Browsers are phasing out X-XSS-Protection, but Safari and IE still support it.
3 years ago
tkr b52fdb4c6f
Fix SMTP_ENABLE_STARTTLS_AUTO/SMTP_TLS/SMTP_SSL environment variables don't work (#17216)
#17215
3 years ago
Sandro 085da13933
Default to system ca-certificates.crt if none is specified (#10857)
Co-Authored-By: Yamagishi Kazutoshi <ykzts@desire.sh>

Co-authored-by: Yamagishi Kazutoshi <ykzts@desire.sh>
3 years ago
Claire 1efcbb9cfe
Add Message-ID header to outgoing emails (#16076)
* Add Message-ID header to outgoing emails

* Use email domain name from SMTP_FROM_ADDRESS, fallback on WEB_DOMAIN on failure

* Use notifications@localhost as fallback for SMTP_FROM_ADDRESS, do not catch parse errors
4 years ago
Claire 71f335c2fc
Add HTTP header to explicitly opt out of FLoC by default (#16036)
Fixes #16034
4 years ago
Claire cbd0ee1d07
Update Mastodon to Rails 6.1 (#15910)
* Update devise-two-factor to unreleased fork for Rails 6 support

Update tests to match new `rotp` version.

* Update nsa gem to unreleased fork for Rails 6 support

* Update rails to 6.1.3 and rails-i18n to 6.0

* Update to unreleased fork of pluck_each for Ruby 6 support

* Run "rails app:update"

* Add missing ActiveStorage config file

* Use config.ssl_options instead of removed ApplicationController#force_ssl

Disabled force_ssl-related tests as they do not seem to be easily testable
anymore.

* Fix nonce directives by removing Rails 5 specific monkey-patching

* Fix fixture_file_upload deprecation warning

* Fix yield-based test failing with Rails 6

* Use Rails 6's index_with when possible

* Use ActiveRecord::Cache::Store#delete_multi from Rails 6

This will yield better performances when deleting an account

* Disable Rails 6.1's automatic preload link headers

Since Rails 6.1, ActionView adds preload links for javascript files
in the Links header per default.

In our case, that will bloat headers too much and potentially cause
issues with reverse proxies. Furhermore, we don't need those links,
as we already output them as HTML link tags.

* Switch to Rails 6.0 default config

* Switch to Rails 6.1 default config

* Do not include autoload paths in the load path
4 years ago
Claire 43eff898a0
Prepare Mastodon for Rails 6 (#15911)
* Fix misuse of foreign_type

* Fix use of removed "add_template_helper"

* Use response.media_type instead of response.content_type in tests

* Fix CSV export controller test on Rails 6

Rails 6 sets a "filename*" field in the Content-Disposition header to
explicitly encode the filename as UTF-8.

This changes checks the first part of the Content-Disposition header so
it matches in both Rails 5 and Rails 6.

* Fix emoji formatting with Rails 6

* Make emoji output more idiomatic and robust

* Switch from redis-rails gem to built-in Rails redis cache storage
4 years ago
Tdxdxoz 376b44853f
add ssl option in smtp setting (#14309) 5 years ago
Hugo Gameiro 5466b39c78 Add SMTP reply_to option (#11718)
* Add SMTP_REPLY_TO in .env.production.sample

* Set reply_to in SMTP options
5 years ago
Eugen Rochko 1bc077dc74
Add HTTP signature keyId to request log (#11591) 5 years ago
Eugen Rochko 22de24b8ca
Fix missing protocol in dns-prefetch, improve code style (#8963)
Regression from #8942
6 years ago
aus-social 0a4739c732 lint pass 2 (#8878)
* Code quality pass

* Typofix

* Update applications_controller_spec.rb

* Update applications_controller_spec.rb
6 years ago
Eugen Rochko 63553c6b5c
Add support for separate Redis for cache (#7272)
* Add support for separate Redis for cache

CACHE_REDIS_URL to allow using a different Redis server for cache
purposes, with cache-specific configuration such as key eviction

* Fix code style issues
7 years ago
Yamagishi Kazutoshi 50529cbceb Upgrade Rails to version 5.2.0 (#5898) 7 years ago
Akihiko Odaki 61dcb686a8 Fix i18n fallback configuration conflicts with environment configurations (#6843) 7 years ago
Akihiko Odaki c110fa62ac Provide default OTP_SECRET value for development environment (#6617) 7 years ago
beatrix 4072b68686 remove Uglifier call from production.rb (#6568) 7 years ago
Eugen Rochko 35a8cafa35 Replace self-rolled statsd instrumention with localshred/nsa (#5118) 7 years ago
Yamagishi Kazutoshi 3f333a8d31 Set fallback address when empty notification address (#4868) 7 years ago
Eugen Rochko a3202fd51e Add SMTP_TLS variable for configuring TLS when server uses non-standard port (#4227) 8 years ago
Akihiko Odaki (@fn_aki@pawoo.net) 2083000027 Set default From address in config (#3756)
The old implementation sets default From address in mailers. It sets
the address from SMTP_FROM_ADDRESS, or notifications@localhost. The
behavior is occasionally undesired results.

In production environment, notifications@localhost is likely to be
incorrect.
In testing environment, the email address should not be varied by a
environment variable.

After appling this change,

In production environment, it will throw an exception when launching
Mastodon.
In testing environment, the address will be fixed with
notifications@localhost.
8 years ago
nullkal b8ea28d6d0 Support multiple trusted proxy ip addresses (#3639)
* Support multiple trusted proxy ip addresses

* correct coding style
8 years ago