Commit Graph

152 Commits (a53f2cf970e798ddd4f94025406989ca4ef41dba)

Author SHA1 Message Date
Mathieu Brunot d70268f099 Convert LDAP username (#12461)
*  Convert LDAP username #12021

Signed-off-by: mathieu.brunot <mathieu.brunot@monogramm.io>

* 🐛 Fix conversion var use

Signed-off-by: mathieu.brunot <mathieu.brunot@monogramm.io>

* 🐛 Fix LDAP uid conversion test

Signed-off-by: mathieu.brunot <mathieu.brunot@monogramm.io>

* 👌 Remove comments with ref to PR

Signed-off-by: mathieu.brunot <mathieu.brunot@monogramm.io>

* 👌 Remove unnecessary paranthesis

Signed-off-by: mathieu.brunot <mathieu.brunot@monogramm.io>

* 🔧 Move space in conversion string

Signed-off-by: mathieu.brunot <mathieu.brunot@monogramm.io>
5 years ago
Thibaut Girka a84aedb7a7 Merge branch 'master' into glitch-soc/merge-upstream
Conflicts:
- app/models/media_attachment.rb
  Upstream raised max image size from 8MB to 10MB while our limit is
  configurable. Raised the default to 10MB.
5 years ago
Mathieu Brunot b85fb6b5e7 Remove quotes in `LDAP_SEARCH_FILTER` example (#12019) 5 years ago
Thibaut Girka 16ff7c5627 Merge branch 'master' into glitch-soc/merge-upstream
Conflicts:
- Gemfile
- Gemfile.lock
- app/controllers/about_controller.rb
- app/controllers/auth/sessions_controller.rb
5 years ago
Yamagishi Kazutoshi 172eaeba3f Add config of multipart threshold for S3 (#11924) 5 years ago
Thibaut Girka 5088eb8388 Merge branch 'master' into glitch-soc/merge-upstream 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
Lady Lumb 19c3a941e8 Added max search results var to sample env
Added and documented MAX_SEARCH_RESULTS to the .env.production.sample file
5 years ago
Thibaut Girka 81bf43cfdd Change .env.production.sample to specify that MAX_VIDEO_SIZE also applies to audio files 5 years ago
Thibaut Girka ddd875ad99 Merge branch 'master' into glitch-soc/merge-upstream
Conflicts:
- app/models/media_attachment.rb
  Upstream added audio attachment support
- app/serializers/initial_state_serializer.rb
  Upstream added audio attachment support and how mimetypes are returned
- app/serializers/rest/instance_serializer.rb
  Upstream added a few fields
- config/application.rb
  Upstream added a different paperclip transcoder
5 years ago
Lady Lumb 1d5434d34c Add audio length var to env sample
Added MAX_AUDIO_LENGTH var and documented in .env.production.sample
5 years ago
Lady Lumb 35c4ff07f4 Added various vars to env sample
Added several vars that are already implemented to the .env.production.sample file.
-Max bio character limit 
-Number of profile fields allowed
-Max display name character limit
5 years ago
Lady Lumb da7bcf29d4 Fixed the very wrong byte to megabyte conversion 5 years ago
Lady Lumb a7b4e7efdd Correctly documented max image and video vars
Added MAX_IMAGE_SIZE and MAX_VIDEO_SIZE and documented their usage.
5 years ago
Thibaut Girka 68629f2773 Merge branch 'master' into glitch-soc/merge-upstream
Conflicts:
- app/controllers/statuses_controller.rb
  minor conflict because of glitch-soc's theming system
- app/controllers/stream_entries_controller.rb
  minor conflict because of glitch-soc's theming system
5 years ago
Stanislas a3c7dd92f3 Add ES_PREFIX in .env.production.sample (#10087) 5 years ago
Zac 5616200ed4 added documentation into .env.production.sample
moved max pin count into constant
5 years ago
Thibaut Girka 36393e1d2b Merge branch 'master' into glitch-soc/merge-upstream
Conflicts:
	app/views/layouts/application.html.haml

Edited:
        app/helpers/application_helper.rb
        app/views/admin/domain_blocks/new.html.haml

Conflict wasn't really one, just two changes too close to one another.
Edition was to adapt the class names for themes to class names for
skins and flavours.

Also edited app/views/admin/domain_blocks/new.html.haml to strip the
duplicate admin pack inclusion thing.
6 years ago
M Somerville 2bba6e582d Rename S3_CLOUDFRONT_HOST to S3_ALIAS_HOST. (#8423)
Still check for S3_CLOUDFRONT_HOST for existing installs.
6 years ago
Thibaut Girka 280d7b1df8 Merge branch 'master' into glitch-soc/merge-upstream
Conflicts:
	app/models/status.rb
	db/migrate/20180528141303_fix_accounts_unique_index.rb
	db/schema.rb

Resolved by taking upstream changes (no real conflicts, just glitch-soc
specific code too close to actual changes).
6 years ago
Immae b0f4fe456b Add ldap search filter (#8151) 6 years ago
Thibaut Girka d392020da6 Merge branch 'master' into glitch-soc/tentative-merge
Conflicts:
	README.md
	app/controllers/statuses_controller.rb
	app/lib/feed_manager.rb
	config/navigation.rb
	spec/lib/feed_manager_spec.rb

Conflicts were resolved by taking both versions for each change.
This means the two filter systems (glitch-soc's keyword mutes and tootsuite's
custom filters) are in place, which will be changed in a follow-up commit.
6 years ago
MIYAGI Hikaru ddd0bb69e1 Merge `HIDDEN_SERVICE_VIA_TRANSPARENT_PROXY` into `ALLOW_ACCESS_TO_HIDDEN_SERVICE` (#7901)
If Mastodon accesses to the hidden service via transparent proxy, it's needed to avoid checking whether it's a private address, since `.onion` is resolved to a private address.
I was previously using the `HIDDEN_SERVICE_VIA_TRANSPARENT_PROXY` to provide that function. However, I realized that using `HIDDEN_SERVICE_VIA_TRANSPARENT_PROXY` is redundant, since this specification is always used with `ALLOW_ACCESS_TO_HIDDEN_SERVICE`. Therefore, I decided to integrate the setting of `HIDDEN_SERVICE_VIA_TRANSPARENT_PROXY` into` ALLOW_ACCESS_TO_HIDDEN_SERVICE`.
6 years ago
Thibaut Girka c087738270 Merge branch 'master' into glitch-soc/merge-upstream 6 years ago
Akihiko Odaki d95642f6d9 Cache attachments on external host with service worker (#7493) 6 years ago
Thibaut Girka 1c9c0167b7 Merge branch 'master' into glitch-soc/master
Conflicts:
	app/models/account.rb
	app/views/accounts/_header.html.haml
6 years ago
Hugo Gameiro ea4e243303 Improve OpenStack v3 compatibility (#7392)
* Update paperclip.rb

* Update .env.production.sample

* Update paperclip.rb
6 years ago
David Yip c816701550
Merge remote-tracking branch 'origin/master' into gs-master
Conflicts:
 	.travis.yml
 	Gemfile.lock
 	README.md
 	app/controllers/settings/follower_domains_controller.rb
 	app/controllers/statuses_controller.rb
 	app/javascript/mastodon/locales/ja.json
 	app/lib/feed_manager.rb
 	app/models/media_attachment.rb
 	app/models/mute.rb
 	app/models/status.rb
 	app/services/mute_service.rb
 	app/views/home/index.html.haml
 	app/views/stream_entries/_simple_status.html.haml
 	config/locales/ca.yml
 	config/locales/en.yml
 	config/locales/es.yml
 	config/locales/fr.yml
 	config/locales/nl.yml
 	config/locales/pl.yml
 	config/locales/pt-BR.yml
 	config/themes.yml
6 years ago
MIYAGI Hikaru f58dcbc981 HTTP proxy support for outgoing request, manage access to hidden service (#7134)
* Add support for HTTP client proxy

* Add access control for darknet

Supress error when access to darknet via transparent proxy

* Fix the codes pointed out

* Lint

* Fix an omission + lint

* any? -> include?

* Change detection method to regexp to avoid test fail
6 years ago
Jenkins f0bb3ff533 Merge remote-tracking branch 'tootsuite/master' into glitchsoc/master 6 years ago
Akihiko Odaki 4f9136d2d5 Document CORS requirement for asset host (#6941) 6 years ago
Jenkins df70571bfe Merge remote-tracking branch 'tootsuite/master' into glitchsoc/master 6 years ago
Alexander 33ee347c99 rename pam email environment variable to something more understandable and default to LOCAL_DOMAIN (better fallback) (#6833) 6 years ago
Jenkins e553905ba7 Merge remote-tracking branch 'tootsuite/master' into glitchsoc/master 6 years ago
Eugen Rochko 675b8fea53
Adjust suggested ES host in .env sample for docker-compose config (#6710) 6 years ago
Jenkins 447d7e6127 Merge remote-tracking branch 'tootsuite/master' into glitchsoc/master 6 years ago
Effy Elden dd9d00d293 Add additional first_name and last_name SAML attribute statement options, and modify Omniauthable concern to use full_name or first_name + last_name if not available (#6669) 6 years ago
David Yip 1b8fcd4df5
Merge remote-tracking branch 'origin/master' into merge-upstream
Conflicts:
 	README.md
 	app/controllers/follower_accounts_controller.rb
 	app/controllers/following_accounts_controller.rb
 	app/serializers/rest/instance_serializer.rb
 	app/views/stream_entries/_simple_status.html.haml
 	config/locales/simple_form.ja.yml
6 years ago
Alexander 42fe05dea1 fix logic for pam_controlled_service (#6599) 6 years ago
Eugen Rochko b4f8e87358
Add LDAP options to .env.production.sample (#6592) 6 years ago
Eugen Rochko 5cc716688a
Ensure the app does not even start if OTP_SECRET is not set (#6557)
* Ensure the app does not even start if OTP_SECRET is not set

* Remove PAPERCLIP_SECRET (it's not used by anything, actually)

Imports are for internal consumption and the url option isn't even
used correctly, so we can remove the hash stuff from them
6 years ago
Eugen Rochko f0a1b1a152
Fix #6536 (#6558) 6 years ago
imncls bb6988a7ac
Merge branch 'master' of https://github.com/tootsuite/mastodon
# Conflicts:
#	app/controllers/settings/exports_controller.rb
#	app/models/media_attachment.rb
#	app/models/status.rb
#	app/views/about/show.html.haml
#	docker_entrypoint.sh
#	spec/views/about/show.html.haml_spec.rb
6 years ago
Ghislain Loaec e668180044 New variable OAUTH_REDIRECT_AT_SIGN_IN + Ref #6538 (not only SAML strategies) (#6540) 6 years ago
Alexander 8fa924e372 Update pam documentation (#6518)
* document pam email extraction

* remove superfluous newline
6 years ago
Ghislain Loaec 3084fe4959 New env variable: SAML_SECURITY_ASSUME_EMAIL_IS_VERIFIED + fixes #6533 (#6538) 6 years ago
Jenkins efc9ffcb80 Merge remote-tracking branch 'tootsuite/master' into glitchsoc/master 6 years ago
Eugen Rochko 3ebc0ad4d3
Full-text search for authorized statuses (#6423)
* Add full-text search for authorized statuses

- Search API will return statuses that match the query
- Only for logged in users
- Only if you are author of the status,
- Or you were mentioned in it
- Or you favourited or reblogged it
- Configuration over `ES_ENABLED`, `ES_HOST`, `ES_PORT`, `ES_PREFIX`
- Run `rails chewy:deploy` to create & populate index

Fix #5880
Fix #4293
Fix #1152

* Add commented out docker-compose configuration for ES container

* Optimize index import, filter search results

* Add basic normalization to the index

* Add better stemming and normalization to the index

* Skip webfinger request if search query includes both @ and a space

* Fix code style

* Visually separate search result sections

* Fix code style issues
6 years ago
David Yip a6fb1c58ee
Merge remote-tracking branch 'origin/master' into merge-upstream
Conflicts:
	.env.production.sample
	app/controllers/auth/confirmations_controller.rb
	db/schema.rb
6 years ago
Eugen Rochko 38e0133e1b
Make PAM gem optional, allow configuration over environment (#6415) 6 years ago
Eugen Rochko 26f21fd5a0
CAS + SAML authentication feature (#6425)
* Cas authentication feature

* Config

* Remove class_eval + Omniauth initializer

* Codeclimate review

* Codeclimate review 2

* Codeclimate review 3

* Remove uid/email reconciliation

* SAML authentication

* Clean up code

* Improve login form

* Fix code style issues

* Add locales
6 years ago
Jenkins 6d00ca1c71 Merge remote-tracking branch 'tootsuite/master' into glitchsoc/master 7 years ago
nightpool 9592b5e31e enforce LOCAL_HTTPS=true in production (#6061)
* enforce https in production

* note changes in production env sample

* typo fix
7 years ago
Lain Iwakura ca5440b93d Rename MAX_CHARS to MAX_TOOT_CHARS to be more specific. 7 years ago
Lain Iwakura 6cd192b9fb Make character limit configurable. 7 years ago
Nolan Lawson d4f80824f7 Document REDIS_NAMESPACE (#5038) 7 years ago
Patrick Figel 3018043fc2 Add OpenStack Keystone V3 support (#4889)
Keystone V2 is deprecated in favour of V3. This adds the necessary
connection parameters for establishing a V3 connection. Connections
to V2 endpoints are still possible and the configuration should
remain compatible.

This also introduces a SWIFT_REGION variable for multi-region
OpenStack environments and a SWIFT_CACHE_TTL that controls how long
tokens and other meta-data is cached for. Caching tokens avoids
rate-limiting errors that would result in media uploads becoming
unavailable during high load or when using tasks like
media:remove_remote. fog-openstack only supports token caching for
V3 endpoints, so a recommendation for using V3 was added.
7 years ago
Yamagishi Kazutoshi fa21d004c7 Add environment sample for OpenStack Swift (#4816) 7 years ago
Treyssat-Vincent Nino aefb4719bc comment correction (#4812) 7 years ago
ScienJus c3e355388a Show SMTP_TLS in config sample (#4477) 7 years ago
Yamagishi Kazutoshi 0fa9dd8527 Add Rake task for generate VAPID key (#4195)
* Add Rake task for generate VAPID key

* edit config/initializers/vapid.rb
7 years ago
Sorin Davidoi 0c7c188c45 Web Push Notifications (#3243)
* feat: Register push subscription

* feat: Notify when mentioned

* feat: Boost, favourite, reply, follow, follow request

* feat: Notification interaction

* feat: Handle change of public key

* feat: Unsubscribe if things go wrong

* feat: Do not send normal notifications if push is enabled

* feat: Focus client if open

* refactor: Move push logic to WebPushSubscription

* feat: Better title and body

* feat: Localize messages

* chore: Fix lint errors

* feat: Settings

* refactor: Lazy load

* fix: Check if push settings exist

* feat: Device-based preferences

* refactor: Simplify logic

* refactor: Pull request feedback

* refactor: Pull request feedback

* refactor: Create /api/web/push_subscriptions endpoint

* feat: Spec PushSubscriptionController

* refactor: WebPushSubscription => Web::PushSubscription

* feat: Spec Web::PushSubscription

* feat: Display first media attachment

* feat: Support direction

* fix: Stuff broken while rebasing

* refactor: Integration with session activations

* refactor: Cleanup

* refactor: Simplify implementation

* feat: Set VAPID keys via environment

* chore: Comments

* fix: Crash when no alerts

* fix: Set VAPID keys in testing environment

* fix: Follow link

* feat: Notification actions

* fix: Delete previous subscription

* chore: Temporary logs

* refactor: Move migration to a later date

* fix: Fetch the correct session activation and misc bugs

* refactor: Move migration to a later date

* fix: Remove follow request (no notifications)

* feat: Send administrator contact to push service

* feat: Set time-to-live

* fix: Do not show sensitive images

* fix: Reducer crash in error handling

* feat: Add badge

* chore: Fix lint error

* fix: Checkbox label overlap

* fix: Check for payload support

* fix: Rename action "type" (crash in latest Chrome)

* feat: Action to expand notification

* fix: Lint errors

* fix: Unescape notification body

* fix: Do not allow boosting if the status is hidden

* feat: Add VAPID keys to the production sample environment

* fix: Strip HTML tags from status

* refactor: Better error messages

* refactor: Handle browser not implementing the VAPID protocol (Samsung Internet)

* fix: Error when target_status is nil

* fix: Handle lack of image

* fix: Delete reference to invalid subscriptions

* feat: Better error handling

* fix: Unescape HTML characters after tags are striped

* refactor: Simpify code

* fix: Modify to work with #4091

* Sort strings alphabetically

* i18n: Updated Polish translation

it annoys me that it's not fully localized :P

* refactor: Use current_session in PushSubscriptionController

* fix: Rebase mistake

* fix: Set cacheName to mastodon

* refactor: Pull request feedback

* refactor: Remove logging statements

* chore(yarn): Fix conflicts with master

* chore(yarn): Copy latest from master

* chore(yarn): Readd offline-plugin

* refactor: Use save! and update!

* refactor: Send notifications async

* fix: Allow retry when push fails

* fix: Save track for failed pushes

* fix: Minify sw.js

* fix: Remove account_id from fabricator
7 years ago
Chris 23081bb299 added 'https://' to CDN_HOST variable example (#3446) 7 years ago
Immae a94c152fd3 Allow alternate domains for mastodon handlers (#3187) 7 years ago
Wonderfall ae78d012ac Some Dockerfile improvements (#3182)
- improve docker_entrypoint.sh
- serve static files with puma by default
- sort packages list
- use virtual package for build deps
- show how to assign UID/GID
7 years ago
Audun Larsen 3da521a586 Adds better documentation to LOCAL_DOMAIN and LOCAL_HTTPS (#3149)
Fixes #2254
7 years ago
Jarek Lipski b18504adfe Improve example env file for local Postfix relay (#2892) 7 years ago
ThibG 4d22d03fab Add additional documentation and warnings to the WEB_DOMAIN setting. (#2386)
* Add additional documentation and warnings to the WEB_DOMAIN setting.

This feature is largely undocumented, and quite a number of users have
shot them in the feet already despite the warning. Added a bit of documentation
and expanded the warning until we have a mechanism for dealing with conflicting
user URIs.

* Change WEB_DOMAIN comments to point to the extensive online documentation
7 years ago
abcang 629a4d0fca fix DB_URL (#2778) 7 years ago
Eugen Rochko c997091166 Clean up redis configuration. Allow using REDIS_URL to set advanced (#2732)
connection options instead of setting REDIS_HOST etc individually

Close #1986
7 years ago
Akihiko Odaki 26bc591572 Allow to set CA file for SMTP (#2713) 7 years ago
evilny0 0876a06e45 Updated note about 'none' SMTP authentication method in .env.production.sample (#2167) 7 years ago
Yamagishi Kazutoshi 8b8e140c71 Change to switch signature version for Amazon S3 (#2124) 7 years ago
Ian Kelling fd62d4de10 Add documentation of SMTP_DOMAIN (#1738)
Without setting it, exim will reject the mail with a message like:
rejected EHLO from [10.20.0.1]: syntactically invalid argument(s): {}
7 years ago
Miguel Jacq e9eaf9e33c Allow using an SMTP server without authentication (#1597)
* Allow using an SMTP server without authentication (e.g Postfix relay on the same host) by setting SMTP_LOGIN and SMTP_AUTH_METHOD to 'none'

* Add note in .env.production.sample about SMTP settings for servers where no auth is required

* Assume that SMTP_LOGIN and SMTP_PASSWORD will be blank if we set SMTP_AUTH_METHOD to none
7 years ago
geta6 64e1d51025 Improve streaming server with cluster (#1970) 7 years ago
Les Orchard 7609593e48 Add REDIS_DB env variable to configure Redis database (#1366) 7 years ago
ThibG a9529d3b4b Allow running mastodon on a different domain as the one used for identifying users (#1267)
* Allow running mastodon on a different domain as the one used for identifying users

* Alter documentation of WEB_DOMAIN to make clear it shouldn't be used unless the admin knows what they are doing

* Compare to web_domain instead of local_domain when dealing with feeds/API

* Correctly identify mentions to local accounts

Mentions URLs point to the person's web profile, i.e., the user page served on WEB_DOMAIN.
7 years ago
Valentin Lorentz 5ab0ffc6c8 Custom Paperclip path. (#778)
* Custom Paperclip path.

* Document PAPERCLIP_ROOT.

* Add PAPERCLIP_ROOT_URL (and rename PAPERCLIP_ROOT to PAPERCLIP_ROOT_PATH).
7 years ago
James Moore d9dc0fe84e smtp delivery type fix (#1556)
* delivery fix

# Conflicts:
#	config/environments/production.rb

* added stub in .env file

* reordered and added a comment
7 years ago
Alexander Mankuta 0dbbc16c69 More SMTP customization (#1372)
* Allow SMTP auth method customization

* Add SMTP openssl_verify_mode option support

Allows one use self-signed certs with their SMTP server.

* Add SMTP enable_starttls_auto option support
7 years ago
Eugen d5a675099a Add env variable to disable prepared statements (#1293) 7 years ago
Eugen 3cb13bdd84 Merge pull request #1125 from jasonrhodes/patch-1
Email service options :P
7 years ago
Jason Rhodes 2ac8a590cd Moved into a comment per feedback 7 years ago
Eugen 0adee18d73 Merge branch 'master' into feature-customized-default-locale 7 years ago
Jantso Porali 786e6f94b9 Update Finnish translations, add sample Minio config (#954) 7 years ago
Eugen Rochko e3a3422a65 Allow setting of default language through config
Setting of locale in controller extracted to Localized concern,
the doorkeeper authorized applications controller moved under
custom namespace with inclusion of Localized, which resolves the
"it sometimes appears in a different random language" bug
7 years ago
Jason Rhodes 5d43a9cae2 Email service options :P
Small addition in case people want email service options, sparkpost.com gives you 100k/mo free
7 years ago
Pete Keen e9a6da6bc7 [#817] Add email whitelist
This adds the ability to filter user signup with a whitelist
instead of or in addition to a blacklist.

Fixes #817
7 years ago
leopku c46843c65c 🔧 S3 protocol from ENV
add support for reading S3 protocol from ENV
also add S3_HOSTNAME in .env.production.sample
7 years ago
Eugen Rochko ccb8ac8573 Make the streaming API also handle websockets (because trying to get the browser EventSource interface to
work flawlessly was a nightmare). WARNING: This commit makes the web UI connect to the streaming API instead
of ActionCable like before. This means that if you are upgrading, you should set that up beforehand.
7 years ago
Eugen Rochko ff90a5ff84 Update sample .env 7 years ago
Eugen 777bcfc701 Add docker-compose example about rake secret task 7 years ago
Eugen Rochko 1357c1cb3d Add single user mode 8 years ago
Eugen Rochko 5973ca3d11 Upgrade Paperclip to 5, AWS-SDK to 2, do not generate medium/small versions of avatars 8 years ago
Eugen Rochko 6c82dfcf5f Fix CDN_HOST variable requirement 8 years ago
Andrea Faulds b107a4820a Remove remnants of Neo4J 8 years ago
Andrea Faulds 82191b3383 Explain application secrets (#217) 8 years ago
Eugen Rochko 4d336cefac Add sync command for neo4j, fix configuration, add neo4j to docker-compose, fix seed 8 years ago
Eugen Rochko 48d66a2055 Fixing the docker container setup (with assets compilation &co) 8 years ago