Compare commits

...

511 Commits

Author SHA1 Message Date
Thor 134b19e593 Merge remote-tracking branch 'origin/main' into local 1 year ago
Thor 0687ef7d13 Merge remote-tracking branch 'upstream/main' into main 1 year ago
Plastikmensch f28942cef9
[Glitch] Refactor styles to use logical properties for positioning (#2156) 1 year ago
Claire 0cbd579ef0
New Crowdin updates (#2172) 1 year ago
Plastikmensch bed63f6dae
Fix default content type setting not applying (#2176) 1 year ago
Claire 14aa7b3c76
Merge pull request #2170 from ClearlyClaire/glitch-soc/merge-upstream 1 year ago
Claire 63a39ae2fa Run `yarn manage:translations` 1 year ago
Claire c11e69f33a Move glitch-soc-only translation strings out of `app/javascript/mastodono/locales` 1 year ago
Claire 251c5ed22e [Glitch] Fix user settings migration script failing in some cases 1 year ago
Nick Schonning bfe46d08f9 [Glitch] Ensure tabIndex is number instead of string 1 year ago
Christian Schmidt 53cdcce3d1 [Glitch] Fix loading spinner + infinite scroll for private mentions 1 year ago
Nick Schonning b756e49cf1 [Glitch] Enable Stylelint property-no-unknown 1 year ago
Christian Schmidt 7b04c2fb71 [Glitch] Fix tooltip for dates without time 1 year ago
Nick Schonning 5b88b7e81a [Glitch] Remove Array.prototype.includes polyfill 1 year ago
Christian Schmidt df6602ede1 [Glitch] Fix account header image missing in low-res 1 year ago
Christian Schmidt 74c61b05ae [Glitch] Fix height of announcements not being updated when using reduced animations 1 year ago
Nick Schonning 791e712a80 [Glitch] Update display_media typing to string 1 year ago
Nick Schonning f3f7ef2d13 [Glitch] Set marginRight as string 1 year ago
Nick Schonning 358e4067bb [Glitch] SUBMIT doesn't exist on XMLHttpRequest 1 year ago
Nick Schonning 0f62451424 [Glitch] HTML string attributes set as booleans 1 year ago
Claire ce12934f5b Merge branch 'main' into glitch-soc/merge-upstream 1 year ago
Claire ff168ef202
Fix most rubocop issues (#2165) 1 year ago
Claire 29a91b871e
Fix glitch-soc Markdown linting issues (#2168) 1 year ago
Claire 10469a0b85
Move locale-data back to `app/javascript/mastodon/locales/locale-data` (#2169) 1 year ago
Claire 99e3e152cd
Fix crash in NotifyService when trying to send an email notification for post edits (#24460) 1 year ago
Claire dc6befe1a4
Fix migrating from upstream to glitch-soc messing with hide_notifications mute settings (#2164) 1 year ago
Claire c3a8f6a0a3
Fix glitch-soc HAML linting issues (#2166) 1 year ago
Christian Schmidt aa136cf2fa
Fix tooltip for dates without time (#24244) 1 year ago
Christian Schmidt 9ef9974ff2
Fix loading spinner + infinite scroll for private mentions (#24446) 1 year ago
Matt Jankowski 9d39b111f1
Expand coverage for "system checks" (#24216) 1 year ago
Nick Schonning 862861069d
Update Node.js to 16.20.0 (#24316) 1 year ago
Matt Jankowski d193bc8c5c
Remove unused methods in 2FA OTP Auth Controller (#24220) 1 year ago
Nick Schonning 26682d4c22
Remove duplicate ca-certificates Docker install (#24231) 1 year ago
Nick Schonning c0886dee14
Remove Array.prototype.includes polyfill (#24234) 1 year ago
Christian Schmidt d7b8c6db7e
Fix account header image missing in low-res (#24433) 1 year ago
Claire 369f239f7b
Fix user settings migration script failing in some cases (#24453) 1 year ago
Claire 3d8bd093b9
Bump version to v4.1.2 (#24427) 1 year ago
Eugen Rochko c9f3438efe
New Crowdin updates (#24378) 1 year ago
Nick Schonning b8ff498781
Fix DevContainer post-create warnings (#23977) 1 year ago
Claire 02d5c69404
New Crowdin updates (#2126) 1 year ago
Claire 9d08b81193
Fix user archive takeouts when using OpenStack Swift (#24431) 1 year ago
Nick Schonning c76d19e00b
Check for missing JSON translations (#24338) 1 year ago
Christian Schmidt ffd5b2eea4
Fix height of announcements not being updated when using reduced animations (#24354) 1 year ago
dependabot[bot] 966d7cff2a
Bump rubocop from 1.48.1 to 1.49.0 (#24387) 1 year ago
dependabot[bot] 4fcfeaba36
Bump puma from 6.1.1 to 6.2.1 (#24402) 1 year ago
dependabot[bot] e2f58c8c82
Bump capybara from 3.38.0 to 3.39.0 (#24395) 1 year ago
dependabot[bot] 60602fd846
Bump aws-sdk-s3 from 1.119.2 to 1.120.0 (#24401) 1 year ago
Nick Schonning 17b2fd2177
Update display_media typing to string (#24416) 1 year ago
Nick Schonning 927b2fd138
Set marginRight as string (#24422) 1 year ago
Nick Schonning ab3f23da91
SUBMIT doesn't exist on XMLHttpRequest (#24423) 1 year ago
Nick Schonning cd14f712ad
Enable Stylelint property-no-unknown (#24404) 1 year ago
Claire 45848d6547
Fix styling regressions from RTL layout refactor (#24415) 1 year ago
Nick Schonning ec0c104bf2
Ensure tabIndex is number instead of string (#24409) 1 year ago
Nick Schonning a425915ce7
HTML string attributes set as booleans (#24408) 1 year ago
Nick Schonning b80a7b031b
Add typechecking in CI (#24405) 1 year ago
dependabot[bot] 0358abe73a
Bump typescript from 4.9.5 to 5.0.3 (#24398) 1 year ago
dependabot[bot] 538914def2
Bump addressable from 2.8.1 to 2.8.2 (#24392) 1 year ago
Claire aa08a72654
Merge pull request #2161 from ClearlyClaire/glitch-soc/merge-upstream 1 year ago
Rubicon Rowe 69ca6316ec [Glitch] Fix inconsistent radius in drawer 1 year ago
Claire d13ef49b15 Merge branch 'main' into glitch-soc/merge-upstream 1 year ago
Claire 0e919397db
Fix unescaped user input in LDAP query (#24379) 1 year ago
Claire af01ab7efe
Merge pull request #2159 from ClearlyClaire/glitch-soc/merge-upstream 1 year ago
Rubicon Rowe fa98363a27
Fix inconsistent radius in drawer (#24407) 1 year ago
dependabot[bot] a8cd1b1238
Bump glob from 9.3.2 to 9.3.4 (#24383) 1 year ago
dependabot[bot] d909aa3c3b
Bump devise from 4.9.0 to 4.9.2 (#24393) 1 year ago
dependabot[bot] dd3e232126
Bump doorkeeper from 5.6.5 to 5.6.6 (#24399) 1 year ago
dependabot[bot] 52089d254d
Bump tzinfo-data from 1.2023.2 to 1.2023.3 (#24400) 1 year ago
Nick Schonning 8e19c44b2c
Align typings with installed versions (#24410) 1 year ago
Christian Schmidt d29cf8a044 [Glitch] Add colour to follow button when hashtag is being followed 1 year ago
Claire 4d5b4dacd6 Merge branch 'main' into glitch-soc/merge-upstream 1 year ago
Claire 8192b0da7c
Merge pull request #2155 from ClearlyClaire/glitch-soc/merge-upstream 1 year ago
Christian Schmidt 77bd32a26a
Add colour to follow button when hashtag is being followed (#24361) 1 year ago
dependabot[bot] 23813e23b3
Bump uri from 0.12.0 to 0.12.1 (#24341) 1 year ago
Claire 5d67fc09c3
Clean up JS dependencies (#24377) 1 year ago
Claire 5c499f54e3
Change root Chewy strategy to emit a warning instead of erroring out in production mode (#24327) 1 year ago
Eugen Rochko 4909c2e718
New Crowdin updates (#24276) 1 year ago
Nick Schonning 373e4a8ff0
Move ESLint configs to overrides (#24370) 1 year ago
Renaud Chaput be230be734
Fix build issues caused by #16210 (#24374) 1 year ago
fusagiko / takayamaki 4520e6473a
[Proposal] Make able to write React in Typescript (#16210) 1 year ago
Alison Wheeler 2f7c3cb628
Update redis_config.rb to remove warning message (#24352) 1 year ago
Claire 7b15f4006a Merge branch 'main' into glitch-soc/merge-upstream 1 year ago
Eugen Rochko 2b11376411
Change search pop-out in web UI (#24305) 1 year ago
Eugen Rochko 46483ae849
Fix regressions from change in account row design in web UI (#24343) 1 year ago
Vyr Cossont d5ad8b6422
Fix Redis client and type errors introduced in #24285 (#24342) 1 year ago
Tdxdxoz d874a7a10f [Glitch] Fix: set multiColumn value for /explore Statuses 1 year ago
Nick Schonning a8f0592b72 [Glitch] Move marky to devDependency 1 year ago
Claire 4aaa1772b6 Restore exif-js dependency 1 year ago
Claire 3dcba94e68 Migrate glitch-soc's exclusive user settings 1 year ago
Claire 280fa3b2c0
Fix invalid/expired invites being processed on sign-up (#24337) 1 year ago
Claire 01d6f7529f Merge branch 'main' into glitch-soc/merge-upstream 1 year ago
Nick Schonning c6c03b49b2
Add Roadmap to README (#24288) 1 year ago
Sai f318f1ef0e
Bump ruby to 3.2.2 due to ReDoS vulnerabilities (#24320) 1 year ago
Nick Schonning 1f19d5e5e8
Add documentation for Rubocop overrides (#23811) 1 year ago
Nick Schonning cb2ce842b0
Autofix Rubocop Rails/IgnoredColumnsAssignment (#23761) 1 year ago
Vyr Cossont 7646ad8a2b
IndexingScheduler: fetch and import in batches (#24285) 1 year ago
Nick Schonning 500d6f93be
Autofix Rubocop Style/IdenticalConditionalBranches (#24322) 1 year ago
Nick Schonning 83fc97285b
Enable Rubocop Metrics/BlockLength with Excludes (#24260) 1 year ago
Christian Schmidt b4f38edf74
Wrong type for user setting when default is defined by lambda (#24321) 1 year ago
Eugen Rochko 68a192e718
Change "direct message" nomenclature to "private mention" in web UI (#24248) 1 year ago
Eugen Rochko a9b5598c97
Change user settings to be stored in a more optimal way (#23630) 1 year ago
Claire e7c3e55874
Fix stale apt index in github actions (#24319) 1 year ago
dependabot[bot] 67450cf002
Bump cssnano from 5.1.15 to 6.0.0 (#24296) 1 year ago
Tdxdxoz 74f56c64fc
Fix: set multiColumn value for /explore Statuses (#24314) 1 year ago
mogamin 9c84563008
Fix missing translation in pagination gap tags (#24262) 1 year ago
Robert R George cb9cc09a6d
Fixes launching of the devcontainer and adds support for Docker Desktop (#24303) 1 year ago
dependabot[bot] c855e1ecbc
Bump sass from 1.59.3 to 1.60.0 (#24292) 1 year ago
dependabot[bot] 550d40a361
Bump rimraf from 4.4.0 to 4.4.1 (#24291) 1 year ago
dependabot[bot] ef52da6dc7
Bump react-textarea-autosize from 8.4.0 to 8.4.1 (#24293) 1 year ago
Christian Schmidt eb38e9df31
Requeue expiration notification (#24311) 1 year ago
dependabot[bot] c384795731
Bump react-select from 5.7.1 to 5.7.2 (#24294) 1 year ago
dependabot[bot] 674f9b5966
Bump prettier from 2.8.5 to 2.8.7 (#24295) 1 year ago
dependabot[bot] 657236546f
Bump mkdirp from 2.1.5 to 2.1.6 (#24297) 1 year ago
dependabot[bot] 4f16e4dbde
Bump glob from 9.3.0 to 9.3.2 (#24298) 1 year ago
dependabot[bot] dc17b93cdb
Bump aws-sdk-s3 from 1.119.1 to 1.119.2 (#24299) 1 year ago
dependabot[bot] b60f7b31cf
Bump tzinfo-data from 1.2022.7 to 1.2023.2 (#24300) 1 year ago
Robert R George 782669a042
Wrap db:setup with Chewy.strategy(:mastodon) (#24302) 1 year ago
Nick Schonning a766804e02
Use Yarn instead of NPX for pre-commit hook (#24287) 1 year ago
Nick Schonning 2115413fa1
Remove remaining CodeClimate references (#24289) 1 year ago
Claire 0d70deee53
Add migration tests for user mail notification settings (#24277) 1 year ago
Claire e084b5b82d
Fix user archive takeout when using OpenStack Swift or S3 providers with no ACL support (#24200) 1 year ago
Nick Schonning ddb769f0b8
Move marky to devDependency (#24258) 1 year ago
Claire c0e87ad8ed
Update strong-migrations-enabled migrations from 5.0 and 5.1 to 5.2 (#24275) 1 year ago
Eugen Rochko cf12621e37
New Crowdin updates (#24130) 1 year ago
Claire cbdb25ab03
Merge pull request #2151 from ClearlyClaire/glitch-soc/main 1 year ago
Eugen Rochko babd86e594
Refactor styles to use logical properties for positioning (#23944) 1 year ago
Vyr Cossont 88fc04d3d7
Serialize status webhook events in REST API format (#24243) 1 year ago
Matt Jankowski 5b7898230e
Update strong_migrations to version 0.8.0 (#24270) 1 year ago
neatchee 8215df76c0 [Glitch] Remove legacy decorators syntax 1 year ago
Nick Schonning 34225d7199
Setup Husky and lint-stage for commit fixing (#23308) 1 year ago
Nick Schonning 00c839b9a9 [Glitch] Remove isNaN polyfill 1 year ago
Claire 14b0311029 Merge branch 'main' into glitch-soc/main 1 year ago
mogamin 63a6808ee1
Fix typo in _login_activity.html.haml (#24263) 1 year ago
Matt Jankowski 3557a65bb2
Reset model in migration after removing column (#24250) 1 year ago
Matt Jankowski 0663803348
Move link header setting to after_action (#24251) 1 year ago
Matt Jankowski b9e34ef098
Migration warning helper, and only run in production env (#24253) 1 year ago
Matt Jankowski e633b26f4f
Add allow_other_host in redirects which may go outside app (#24252) 1 year ago
Matt Jankowski e63524f457
Update retention model sql query (#24249) 1 year ago
Eugen Rochko 9bda933740
Change media upload limits and remove client-side resizing (#23726) 1 year ago
Eugen Rochko ef127c964a
Change design of account rows in web UI (#24247) 1 year ago
Yamagishi Kazutoshi 6e8711ff91
Add missing parenthesis (#24238) 1 year ago
Yamagishi Kazutoshi d1b057a0ac
Remove legacy decorators syntax (#18357) 1 year ago
Nick Schonning 503022d6f9
Exclude files for Rubocop Metrics/ClassLength (#24213) 1 year ago
Nick Schonning e7e189fa44
Use Yarn production install for asset compile (#24232) 1 year ago
Plastikmensch 81e85782d1
Fix docker images not being pushed (#2143) 1 year ago
Claire 867790e07a
Merge pull request #2144 from ClearlyClaire/glitch-soc/merge-upstream 1 year ago
Nick Schonning b46125224c
Remove isNaN polyfill (#24224) 1 year ago
Christian Schmidt 16da4a09e8
Fix broken links in account gallery (#24218) 1 year ago
mogamin b4f60bc6de [Glitch] Fit the max-width of media in .prose to parent box 1 year ago
Claire 5ac380c122 Merge branch 'main' into glitch-soc/merge-upstream 1 year ago
Claire 2626097869
Fix Rails cache namespace being overriden with `v2` for cached statuses (#24202) 1 year ago
Matt Jankowski a7a578a055
Remove unused InstancePresenter methods (#24206) 1 year ago
Matt Jankowski b179ff84c7
Add specs for Chewy importers (#24204) 1 year ago
Simon Elvery 148c3d5894
Update profile link verification instructions (#19723) 1 year ago
Claire 7f8e1bede4
Bump version to v4.1.1 (#24201) 1 year ago
Takeshi Umeda 38c84f57b6
Refactoring relations_map (#24195) 1 year ago
dependabot[bot] 9f8d1601a4
Bump stackprof from 0.2.23 to 0.2.24 (#24190) 1 year ago
dependabot[bot] a4d285f2f9
Bump prettier from 2.8.4 to 2.8.5 (#24188) 1 year ago
dependabot[bot] de6d504023
Bump stylelint from 15.2.0 to 15.3.0 (#24185) 1 year ago
dependabot[bot] f20843e60d
Bump react-select from 5.7.0 to 5.7.1 (#24187) 1 year ago
dependabot[bot] 84f14b2451
Bump rack-cors from 1.1.1 to 2.0.1 (#24189) 1 year ago
dependabot[bot] 4f4cbce295
Bump pghero from 3.3.0 to 3.3.1 (#24186) 1 year ago
mogamin 0a9def5498
Fit the max-width of media in .prose to parent box (#24180) 1 year ago
Matt Jankowski 7bef11630d
Remove references to non-existent actions (#24183) 1 year ago
Claire bdeb6ff180
Fix crash in `tootctl` commands making use of parallelization when Elasticsearch is enabled (#24182) 1 year ago
Eugen Rochko 0ca54a4105
Remove `Permissions-Policy` header from all responses (#24124) 1 year ago
Plastikmensch 02ac94490a
Add getting-started-misc to route (#2141) 1 year ago
Vyr Cossont 94cbd808b5
Webhooks for local status.create, status.update, account.update (#24133) 1 year ago
Claire 9a111a615f
Merge pull request #2138 from ClearlyClaire/glitch-soc/merge-upstream 1 year ago
Claire 3091a184ca Merge branch 'main' into glitch-soc/merge-upstream 1 year ago
Claire 00fe0f6cb4
Merge pull request #2136 from ClearlyClaire/glitch-soc/merge-upstream 1 year ago
Nick Schonning 34096bc6ea
Upgrade redis-node to latest (#24154) 1 year ago
Nick Schonning f7b9b36fc3
Revert "Dedupe yarn.lock with yarn-deduplicate" (#24155) 1 year ago
Nick Schonning 9758112c97
Dedupe yarn.lock with yarn-deduplicate (#24119) 1 year ago
Jean byroot Boussier 160f38f03d
Workaround the ActiveRecord / Marshal serialization bug on Ruby 3.2 (#24142) 1 year ago
Nick Schonning b22b4bac03
Include config/ and update all rubcop deps (#23963) 1 year ago
CSDUMMI d75a1e5054
Link to the Identity provider's account settings from the account settings (#24100) 1 year ago
dependabot[bot] be9a4912d8
Bump rimraf from 4.1.2 to 4.4.0 (#24048) 1 year ago
dependabot[bot] f53970abce
Bump glob from 8.1.0 to 9.3.0 (#24110) 1 year ago
Christian Schmidt 8f97ffe91e [Glitch] Replace `Status#translatable?` with language matrix in separate endpoint 1 year ago
Claire 193250556c Merge branch 'main' into glitch-soc/merge-upstream 1 year ago
Claire f5daa20f2a
Merge pull request #2134 from ClearlyClaire/glitch-soc/merge-upstream 1 year ago
Nick Schonning 681dcd3fa3
Ignore additional Style/OptionalBooleanParameter (#24138) 1 year ago
Claire 8fdf49b11d
Add warning for object storage misconfiguration (#24137) 1 year ago
Eugen Rochko 75e5a6e437
Change user backups to use expiring URLs for download when possible (#24136) 1 year ago
Matt Jankowski edc7ca5920
Roll back unintentionally activated rubocop rules (#24132) 1 year ago
Eugen Rochko a085901108
New Crowdin updates (#23904) 1 year ago
Christian Schmidt bd047acc35
Replace `Status#translatable?` with language matrix in separate endpoint (#24037) 1 year ago
Eugen Rochko 630436ab2d
Refactor monkey-patching of `PrivateAddressCheck` (#24122) 1 year ago
Nick Schonning aa947a143b
Regen rubocop-todo without Max shadowing (#24076) 1 year ago
dependabot[bot] f57bcb028b
Bump sass from 1.58.3 to 1.59.3 (#24105) 1 year ago
dependabot[bot] aa7d63d9aa
Bump autoprefixer from 10.4.13 to 10.4.14 (#24108) 1 year ago
Eugen Rochko f0e727f958
Add cache headers to static files served through Rails (#24120) 1 year ago
dependabot[bot] be488adf71
Bump @babel/core from 7.21.0 to 7.21.3 (#24111) 1 year ago
Eugen Rochko 8cb2543ee5
Add `SENDFILE_HEADER` environment variable (#24123) 1 year ago
Eugen Rochko 6fa81ca17e
Remove `bullet` and `active_record_query_trace` gems (#24121) 1 year ago
dependabot[bot] dbbd462c10
Bump eslint from 8.35.0 to 8.36.0 (#24089) 1 year ago
dependabot[bot] b9618c82e3
Bump @babel/eslint-parser from 7.19.1 to 7.21.3 (#24109) 1 year ago
dependabot[bot] b1b8a27b42
Bump immutable from 4.2.4 to 4.3.0 (#24088) 1 year ago
Nick Schonning 25d36b6edd
Autofix Rubocop Style/RedundantArgument (#23798) 1 year ago
dependabot[bot] 0566c81a0c
Bump rack-test from 2.0.2 to 2.1.0 (#24112) 1 year ago
Nick Schonning a38f67c1c3
Autofix Rubocop Style/PreferredHashMethods (#23851) 1 year ago
Nick Schonning 65669d3c57
Fix more haml-lint Rubocop (#24107) 1 year ago
Nick Schonning 0b8b0ef652
Skip pushing containers on forks (#24106) 1 year ago
Renaud Chaput f9bdaebad2
Use Github Container Registry as the official container image source (#24113) 1 year ago
Rodion Borisov 32418f0ff3 [Glitch] Center the text itself in upload area 1 year ago
PauloVilarinho 17fb58bff3 [Glitch] add modal message when editing toot 1 year ago
Claire 3ef5f62abf Merge branch 'main' into glitch-soc/merge-upstream 1 year ago
Claire 6a0ed45aa3
Merge pull request #2122 from ClearlyClaire/glitch-soc/merge-upstream 1 year ago
Nick Schonning 75131e7bf7
Setup haml-lint CI with todo config (#23524) 1 year ago
Claire a232a1feb8
Fix misleading error code when receiving invalid WebAuthn credentials (#23568) 1 year ago
Claire cf50667e26
Fix incorrect post links in strikes when the account is remote (#23611) 1 year ago
Claire 9875be09fe
Fix dashboard crash on ElasticSearch server error (#23751) 1 year ago
Nick Schonning 15fdd94e2f
Update PostCSS dependencies (#23835) 1 year ago
Matt Jankowski a471e1c48f
Add spec for the CLI `version` task (#23978) 1 year ago
CSDUMMI 39c7236649
Redirect users to SLO at the IdP after logging them out of Mastodon. (#24020) 1 year ago
Claire 1d0ad558ff
Change sidekiq-bulk's batch size from 10,000 to 1,000 jobs in one Redis call (#24034) 1 year ago
Nick Schonning ed887271f3
Skip Docker CI Login/Push on forks (#23564) 1 year ago
Renaud Chaput 50d39c275d
Push Docker images to Github Container Registry as well (#24101) 1 year ago
dependabot[bot] f4f3e2b46e
Bump rubocop from 1.48.0 to 1.48.1 (#24095) 1 year ago
dependabot[bot] 5b39d20804
Bump rails from 6.1.7.2 to 6.1.7.3 (#24096) 1 year ago
dependabot[bot] 82d7b08fcf
Bump rack from 2.2.6.3 to 2.2.6.4 (#24097) 1 year ago
CSDUMMI 5dee40b5f5
Support the PROXY protocol through the PROXY_PROTO_V1 env variable (#24064) 1 year ago
dependabot[bot] 43ec9d24f9
Bump pghero from 3.2.0 to 3.3.0 (#24085) 1 year ago
dependabot[bot] 245f0aead2
Bump jsdom from 21.1.0 to 21.1.1 (#24090) 1 year ago
CSDUMMI d258ec8e3b
Prefer the stored location as after_sign_in_path in Omniauth Callback Controller (#24073) 1 year ago
Nick Schonning e762a14c0a
Enable Rubocop Performance/DeleteSuffix (#24077) 1 year ago
Claire f432db7b9f
Fix sidekiq jobs not triggering Elasticsearch index updates (#24046) 1 year ago
Matt Jankowski 1ed12d5e2f
Add basic search specs for chewy indexes (#24065) 1 year ago
Nick Schonning 3ea0856f70
Enable RSpec/FilePath (#23965) 1 year ago
dependabot[bot] 8931f18a21
Bump eslint from 8.33.0 to 8.35.0 (#24049) 1 year ago
dependabot[bot] 540d49ec14
Bump pghero from 3.1.0 to 3.2.0 (#24044) 1 year ago
Matt Jankowski 688287c59d
Coverage improvement round-out following up previous work (#23987) 1 year ago
Matt Jankowski 56bddfbfa3
Serializers spec coverage (#24017) 1 year ago
dependabot[bot] 53309fa31a
Bump puma from 6.1.0 to 6.1.1 (#24045) 1 year ago
Nick Schonning 4fa542f3c4
Sync CI and Docker Compose image versions (#24053) 1 year ago
Rodion Borisov a52ccd7ad9
Center the text itself in upload area (#24029) 1 year ago
Matt Jankowski 2f7a663b0b
Explicitly set github repo in instance presenter spec (#24036) 1 year ago
Christian Schmidt 684a970b3c
Unescape HTML entities (#24019) 1 year ago
Nick Schonning 9dfe2dbd3f
Skip rebase-needed job for i10n branch (#24026) 1 year ago
9p4 b715bd8e53
Add refreshing many accounts at once with "tootctl accounts refresh" (#23304) 1 year ago
dependabot[bot] 0bc1a002fd
Bump babel-jest from 29.4.3 to 29.5.0 (#24007) 1 year ago
dependabot[bot] f47c404f88
Bump mkdirp from 2.1.3 to 2.1.5 (#23994) 1 year ago
dependabot[bot] 60d664eab8
Bump rubocop from 1.45.1 to 1.48.0 (#23999) 1 year ago
dependabot[bot] a47358e27c
Bump jest-environment-jsdom from 29.4.3 to 29.5.0 (#23998) 1 year ago
dependabot[bot] 71cd77536d
Bump jest from 29.4.3 to 29.5.0 (#24003) 1 year ago
dependabot[bot] 5da3fd170e
Bump doorkeeper from 5.6.4 to 5.6.5 (#24009) 1 year ago
dependabot[bot] c9860d36d4
Bump omniauth_openid_connect from 0.6.0 to 0.6.1 (#23991) 1 year ago
dependabot[bot] 3d46823e9f
Bump utf-8-validate from 6.0.2 to 6.0.3 (#23992) 1 year ago
dependabot[bot] ff1913d58f
Bump axios from 1.3.3 to 1.3.4 (#23996) 1 year ago
dependabot[bot] aabf2bf8d6
Bump rack from 2.2.6.2 to 2.2.6.3 (#23997) 1 year ago
dependabot[bot] 49a4a7fa83
Bump sidekiq-scheduler from 5.0.1 to 5.0.2 (#24004) 1 year ago
dependabot[bot] 722349963c
Bump yargs from 17.7.0 to 17.7.1 (#24002) 1 year ago
dependabot[bot] 6ee39e85f3
Bump pg from 1.4.5 to 1.4.6 (#24001) 1 year ago
Nick Schonning fb13f37475
Skip double building on Dependabot branches (#24025) 1 year ago
Nick Schonning e594bb7d50
Convert CircleCI to GitHub Actions (#23608) 1 year ago
Claire 174352716a
Disable anonymous access to the streaming API (#23989) 1 year ago
Claire 59b24c3688
Fix `/api/v1/streaming` sub-paths not being redirected (#23988) 1 year ago
Matt Jankowski dfa1be4ab4
Remove unused TOCGenerator (#23986) 1 year ago
PauloVilarinho 8770473dbb
add modal message when editing toot (#23936) 1 year ago
Claire 21db91a0a8
Remove sidebar dead code (#23984) 1 year ago
Claire 86f8aa2db2
Fix unconfirmed accounts being registered as active users (#23803) 1 year ago
Nick Schonning 4595862978
Remove pinned rexml (#23964) 1 year ago
Christian Schmidt c4cf92094e
Do not strip tags from `Setting.site_short_description` (#23975) 1 year ago
Claire 7f96391eae Normalize translations 1 year ago
Claire 7f3b0dedeb Refactor glitch-soc rich text SCSS 1 year ago
Christian Schmidt 1317553f3a [Glitch] Only offer translation for supported languages 1 year ago
Terry Garcia 9a1bd1c3e9 [Glitch] Switched bookmark and favourites around 1 year ago
Claire 03ac84b0f4 [Glitch] Fix duplicate “Publish” button on mobile 1 year ago
Claire 7623e18124 Merge branch 'main' into glitch-soc/merge-upstream 1 year ago
Claire bb4e211c86
New Crowdin updates (#2118) 1 year ago
Claire bcbc2a43d4
Merge pull request #2121 from ClearlyClaire/glitch-soc/merge-upstream 1 year ago
Christian Schmidt 0e476f3c4f [Glitch] Add `lang` attribute to media and poll options 1 year ago
Eugen Rochko dfa9843ac8
Fix pgBouncer resetting application name on every transaction (#23958) 1 year ago
Eugen Rochko be1792e1d4
Fix streaming API not being usable without `DATABASE_URL` (#23960) 1 year ago
Samruddhi Khandale ade3c5d40c
Updates dev container and adds doc for getting started with GitHub Codespaces (#23872) 1 year ago
Nick Schonning 82a6cf4012
Enable Rubocop for app/views (#23874) 1 year ago
Matt Jankowski 14f0b48fb6
Update browser gem to version 5.3.1 (#23945) 1 year ago
Christian Schmidt cb868228bd
Do not leave Mastodon when clicking “Back” (#23953) 1 year ago
Matt Jankowski c599e289d8
Fix spec for api/v1/statuses/translations (#23956) 1 year ago
Matt Jankowski 2d1ccb3d8b
Restore missing fabricators (#23951) 1 year ago
Matt Jankowski 506b16cf59
Pending example models minimal coverage (#23912) 1 year ago
Matt Jankowski 7f4412eeeb
User mailer spec coverage improvements (#23905) 1 year ago
Matt Jankowski 42ddc45133
Admin controllers specs (#23917) 1 year ago
Matt Jankowski ad585fb195
Specs api v1 controllers (#23930) 1 year ago
Matt Jankowski cd99fa8ceb
Fabricator specs (#23925) 1 year ago
Matt Jankowski c40d5e5a8f
Misc coverage improvements for validators (#23928) 1 year ago
Matt Jankowski 2f606ba122
Helpers specs coverage improvement (#23937) 1 year ago
Matt Jankowski 00eb2269b6
Policies specs (#23924) 1 year ago
Matt Jankowski 6a57c42316
Settings controllers specs (#23915) 1 year ago
Matt Jankowski 39e7525c96
Add basic coverage for some worker jobs (#23943) 1 year ago
Matt Jankowski f9c2213ae5
Models specs coverage (#23940) 1 year ago
Jean byroot Boussier 922837dc96
Upgrade to latest redis-rb 4.x and fix deprecations (#23616) 1 year ago
Claire aa98c8fbeb
Disable Style/SymbolArray (#23921) 1 year ago
Nick Schonning 1840d5d50c
Remove pry gems (#23884) 1 year ago
Nick Schonning b00f945d92
Remove implied StandardError rescue (#23942) 1 year ago
Nick Schonning c65c34dfd1
Remove climate_control gem (#23886) 1 year ago
Claire 050f1669c6
Fix original account being unfollowed on migration before the follow request could be sent (#21957) 1 year ago
Claire ddde4e0d95
Change `ActivityPub::DeliveryWorker` retries to be spread out more (#21956) 1 year ago
Christian Schmidt 5a8c651e8f
Only offer translation for supported languages (#23879) 1 year ago
Ramūns Usovs 0872f3e3d7
Allow streaming to connect to postgress with self-signed certs (#21431) 1 year ago
Jamie Hoyle de137e6bb0
Added support for specifying S3 storage classes in environment (#22480) 1 year ago
Claire 3f52e717fa
Add tests for moderation actions without custom text (#23184) 1 year ago
Claire 6b16b77ab0
Fix external authentication not running onboarding code for new users (#23458) 1 year ago
Claire 8784498ebf
Fix tootctl accounts migrate error due to typo (#23567) 1 year ago
Claire d6679d1751
Add mail headers to avoid auto-replies (#23597) 1 year ago
Claire f94aa70b81
Fix error when displaying post history of a trendable post in the admin interface (#23574) 1 year ago
Terry Garcia a1347f456e
Switched bookmark and favourites around (#23701) 1 year ago
Claire 02c6bad3ca
Change unintended SMTP read timeout from 5 seconds to 20 seconds (#23750) 1 year ago
Claire f8bb4d0d6b
Fix server error when failing to follow back followers from `/relationships` (#23787) 1 year ago
Claire b55fc883b6
Fix duplicate “Publish” button on mobile (#23804) 1 year ago
Claire c2a046ded1
Fix “Remove all followers from the selected domains” being more destructive than it claims (#23805) 1 year ago
Claire 3a6451c867
Add support for incoming rich text (#23913) 1 year ago
Claire 276c1d32d6 Merge branch 'main' into glitch-soc/merge-upstream 1 year ago
Matt Jankowski af578e8ce0
Fix deprecation warning about merging conditions (#23618) 1 year ago
Matt Jankowski 9da52ac044
Update rspec-rails to version 6.0.1 (#23908) 1 year ago
Matt Jankowski 35dff48edf
Add spec coverage for Admin::Trends::StatusesHelper (#23898) 1 year ago
Shlee 59f42c262b
[Dependashlee] Bump @github/webauthn-json from 0.5.7 to 2.1.1 (js) (#23819) 1 year ago
Shlee 083e18e45b
[Dependashlee] Bump fuzzysort from 1.9.0 to 2.0.4 (JS) (#23822) 1 year ago
Shlee 6047c84468
[Dependashlee] Bump color-blend from 3.0.1 to 4.0.0 (JS) (#23823) 1 year ago
Stanislav Dobrovolschii d9271126ce
Add rspecs for FollowRecommendationsScheduler (#23890) 1 year ago
Matt Jankowski b6602f68eb
Spec coverage for HomeHelper (#23907) 1 year ago
Eugen Rochko cb97ba7a2f
New Crowdin updates (#23802) 1 year ago
Nick Schonning 56489cdc4f
Autofix Rubocop Style/HashConversion (#23852) 1 year ago
Matt Jankowski 6185efbc3c
Admin mailer spec coverage improvement (#23863) 1 year ago
Shlee f8848a5c8b
[Dependashlee] Update to Puma 6.1.0 (#23795) 1 year ago
Matt Jankowski cc3633539e
Remove unused admin/announcements helper (#23899) 1 year ago
Matt Jankowski 055ed5a616
Remove unused InstancePresenter#sample_accounts method (#23900) 1 year ago
Matt Jankowski 9ee83a9f3b
Add policies and serializers groups to simplecov output (#23897) 1 year ago
Matt Jankowski 4bb39ac3c3
Fix single-record invalid condition on PollVote (#23810) 1 year ago
Christian Schmidt d3eefead30
Add `lang` attribute to media and poll options (#23891) 1 year ago
Claire 6a4be4e966
Merge pull request #2119 from ClearlyClaire/glitch-soc/merge-upstream 1 year ago
Claire b91756fd4d Move misc rules from components/index.scss to components/misc.scss 1 year ago
Claire cc94cc86ae Fix glitch-soc SCSS code style and refactor closer to upstream 1 year ago
Claire ac8512a73a Add glitch-soc's win95.scss and reset.scss to stylelint's ingore list 1 year ago
Christian Schmidt b632c5a55a [Glitch] Add `lang` attribute to preview card 1 year ago
Tim Lucas 28cb77bd07 [Glitch] Increase contrast of upload progress background 1 year ago
Botao Wang 56bec60f25 [Glitch] Fix sidebar cut-off on small screens in admin UI 1 year ago
Claire 31455f05fb [Glitch] Add `lang` tag to native language names in language picker 1 year ago
Renaud Chaput 81ef21a0c8 [Glitch] Rename JSX files with proper `.jsx` extension 1 year ago
Claire 859eb01aac Fix building vanilla flavor after JSX change 1 year ago
Claire 4ed09276d5 Merge branch 'main' into glitch-soc/merge-upstream 1 year ago
Matt Jankowski 730bb3e211
Remove unused HTML Validator (#23866) 1 year ago
Christian Schmidt 8000a8f230
Add `lang` attribute to preview card (#23869) 1 year ago
Nick Schonning 19614ba247
Rename ActivityPub Serializer Specs (#23844) 1 year ago
Claire 20b80c62ff
Change auto-deletion throttling constants to better scale with server size (#23320) 1 year ago
Tim Lucas f4f91bc295
Increase contrast of upload progress background (#23836) 1 year ago
Nick Schonning 6bd7003799
Fix mispelled spec filenames (#23834) 1 year ago
Eugen Rochko 2564117131
New Crowdin updates (#23625) 1 year ago
Claire f682478de8
Fix inefficiency when searching accounts per username in admin interface (#23801) 1 year ago
Claire 3ed1b9ebb6
Fix rack:attack flaky tests and test end of throttle period (#23799) 1 year ago
Nick Schonning 4ff44be134
Autofix Rubocop Rails/Blank (#23765) 1 year ago
Nick Schonning 8fd3fc404d
Autofix Rubocop Rails/RootPathnameMethods (#23760) 1 year ago
Nick Schonning 48aeab90f6
Ignore JSX files from Prettier (#23777) 1 year ago
Nick Schonning 84cc805cae
Enable Style/FrozenStringLiteralComment for specs (#23790) 1 year ago
Nick Schonning 0cfdd1a401
Enable Rubocop Style/StringConcatenation defaults (#23792) 1 year ago
dependabot[bot] 7ecf783dd3
Bump @babel/plugin-proposal-decorators from 7.20.13 to 7.21.0 (#23769) 1 year ago
dependabot[bot] 9d8349f0c4
Bump @babel/plugin-transform-react-inline-elements from 7.18.6 to 7.21.0 (#23766) 1 year ago
dependabot[bot] 24d265d604
Bump @babel/plugin-transform-runtime from 7.19.6 to 7.21.0 (#23774) 1 year ago
dependabot[bot] a573641b15
Bump @babel/core from 7.20.12 to 7.21.0 (#23767) 1 year ago
dependabot[bot] 92a0afda28
Bump @babel/runtime from 7.20.13 to 7.21.0 (#23773) 1 year ago
dependabot[bot] 4b964fa605
Bump devise from 4.8.1 to 4.9.0 (#23691) 1 year ago
Botao Wang 7adde24a95
Fix sidebar cut-off on small screens in admin UI (#23764) 1 year ago
dependabot[bot] 513316f768
Bump stylelint from 15.1.0 to 15.2.0 (#23770) 1 year ago
dependabot[bot] 57b83ce337
Bump blurhash from 2.0.4 to 2.0.5 (#23771) 1 year ago
dependabot[bot] d58400d00c
Bump sass from 1.58.2 to 1.58.3 (#23772) 1 year ago
dependabot[bot] fbbf5c4841
Bump capistrano from 3.17.1 to 3.17.2 (#23775) 1 year ago
Claire 7207a98d39
Add `lang` tag to native language names in language picker (#23749) 1 year ago
Nick Schonning 434770f580
Autofix Rubocop Rails/FindById (#23762) 1 year ago
Claire 45087c1092
Merge pull request #2117 from ClearlyClaire/glitch-soc/merge-upstream 1 year ago
Nick Schonning 35d032500b
Autofix Rubocop Security/IoMethods (#23757) 1 year ago
Nick Schonning 9909b4b653
Autofix Rubocop Rails/WhereEquals (#23759) 1 year ago
Claire d3b4d4d4f3
Change compose form checkbox to native input with `appearance: none` (#22949) 1 year ago
Nick Schonning b65ca7acc9
Update rebase needed job settings (#23746) 1 year ago
Nick Schonning 59c8d43d94
Autofix Rubocop Style/RescueStandardError (#23745) 1 year ago
Christian Schmidt 62c4aecf8f
Make larger part of status clickable (#23621) 1 year ago
Nick Schonning 2c3c734bcc
Autofix Rubocop Style/SymbolProc (#23742) 1 year ago
Nick Schonning af4c95100c
Autofix Rubocop Style/FormatString (#23743) 1 year ago
Nick Schonning a9472f8ff1
Fix Markdown files with Prettier and check in CI (#21972) 1 year ago
Nick Schonning 717683d1c3
Autofix Rubocop remaining Layout rules (#23679) 1 year ago
Nick Schonning d2dcb6c45a
Autofix Rubocop Style/UnpackFirst (#23741) 1 year ago
Nick Schonning 5116347eb7
Autofix Rubocop RSpec/BeEq (#23740) 1 year ago
Nick Schonning bf785df9fe
Audofix Rubocop Style/WordArray (#23739) 1 year ago
Nick Schonning 4552685f6b
Autofix Rubocop RSpec/LeadingSubject (#23670) 1 year ago
Nick Schonning 4ea1e0fceb
Enable Rubocop RSpec/ExpectActual (#23720) 1 year ago
Nick Schonning 38a1d8bb85
Autofix Rubocop RSpec/ImplicitSubject (#23721) 1 year ago
Nick Schonning 63e6353886
Autofix Rubocop Rails/EnumHash (#23737) 1 year ago
Renaud Chaput 44a7d87cb1
Rename JSX files with proper `.jsx` extension (#23733) 1 year ago
Nick Schonning f0e1b12c10
Autofix Rubocop Style/ExplicitBlockArgument (#23704) 1 year ago
Nick Schonning 5179c47087
Autofix Rubocops RSpec/ScatteredLet (#23725) 1 year ago
Nick Schonning aef0051fd0
Enable Rubocop HTTP status rules (#23717) 1 year ago
Nick Schonning bd1d57c230
Autofix Rubocop RSpec/EmptyLineAfterSubject (#23719) 1 year ago
Nick Schonning dbc6d7b276
Autofix Rubocop Lint/UnusedBlockArgument (#23712) 1 year ago
Nick Schonning 65ba0d92ef
Enable Rubocop RSpec/NotToNot (#23723) 1 year ago
Nick Schonning a2fdb388eb
Autofix Rubocop RSpec/ReturnFromStub (#23724) 1 year ago
Nick Schonning 21bf326356
Autofix Rubocop Rails/Pluck (#23730) 1 year ago
Nick Schonning 597767a9f7
Autofix Rubocop Rails/RedundantForeignKey (#23731) 1 year ago
Nick Schonning 8ef09813a2
Autofix Rubocop Style/EmptyMethod (#23732) 1 year ago
Claire dc0cc5a57d Fix incorrect translation string in glitch-soc captcha feature 1 year ago
Claire 8c8358b3cf [Glitch] Fix focus point of already-attached media not saving after edit 1 year ago
Christian Schmidt 229ab559dc [Glitch] Fix bad type for spellCheck attribute 1 year ago
Nick Schonning 6fdd596cc8 [Glitch] Enable ESLint Promise plugin defaults 1 year ago
Claire 7452a95998 Merge branch 'main' into glitch-soc/merge-upstream 1 year ago
Thor 5b48c98c08 Merge remote-tracking branch 'origin/main' into local 1 year ago
Thor d9618e12c5 Explicit Chewy imports for statuses 1 year ago
AcesFullOfKings fef6c59b3a
Grammar fix (#23634) 1 year ago
Claire b2283b6838
Fix focus point of already-attached media not saving after edit (#23566) 1 year ago
Nick Schonning 1d9ed91643
Move db migration CI to GitHub Actions (#23624) 1 year ago
Yamagishi Kazutoshi 77779ddebc
Fix devcontainer.json format (#23715) 1 year ago
Nick Schonning e0e63b73ee
Autofix Rubocop RSpec/EmptyLineAfterHook (#23718) 1 year ago
Nick Schonning 81ad6c2e39
Autofix Rubocop Style/StringLiterals (#23695) 1 year ago
Nick Schonning ac3561098e
Autofix Rubocop RSpec/LetBeforeExamples (#23671) 1 year ago
Nick Schonning 1a02101100
Autofix Rubocop Style/EmptyLambdaParameter (#23705) 1 year ago
Nick Schonning 3680e032b4
Autofix Rubocop RSpec/EmptyLineAfterFinalLet (#23707) 1 year ago
Nick Schonning 2177daeae9
Autofix Rubocop Style/RedundantBegin (#23703) 1 year ago
Nick Schonning 167709f6b0
Autofix Rubocop Style/BlockDelimiters (#23706) 1 year ago
Nick Schonning c0d7c855b3
Autofix Rubocop RSpec/Capybara/FeatureMethods (#23708) 1 year ago
Nick Schonning 08289a38fa
Autofix Rubocop Style/TrailingCommaInArrayLiteral (#23692) 1 year ago
Claire 4c68189d2b
Merge pull request #2112 from ClearlyClaire/glitch-soc/merge-upstream 1 year ago
Nick Schonning ea9a1d79df [Glitch] Upgrade to Stylelint 15 with Prettier 1 year ago
Nick Schonning 7e64eef73b [Glitch] Enable ESLint no-useless-escape 1 year ago
Claire 587f6b3b06 [Glitch] Enable ESLint import recommended rules 1 year ago
Nick Schonning 5069769cbe
Autofix Rubocop Style/TrailingCommaInHashLiteral (#23693) 1 year ago
Nick Schonning de4b8224c0
Run bundler-audit on PRs (#23514) 1 year ago
Nick Schonning b4cbfff3eb
Autofix Rubocop RSpec/ExcessiveDocstringSpacing (#23666) 1 year ago
Nick Schonning 7e215b3bda
Check for missing i18n strings in CI (#23368) 1 year ago
Nick Schonning b4df632ca1
Run prettier on full repo with ignored extensions (#23538) 1 year ago
Nick Schonning c38bd17657
Autofix Rubocop Style/TrailingCommaInArguments (#23694) 1 year ago
Nick Schonning ab7816a414
Autofix Rubocop Style/Lambda (#23696) 1 year ago
Nick Schonning e2a3ebb271
Autofix Rubocop Style/IfUnlessModifier (#23697) 1 year ago
Claire 2be88d1930
New Crowdin updates (#2111) 1 year ago
Thor 644333ff0e Merge remote-tracking branch 'origin/main' into local 1 year ago
Thor cdf30cf5db Allow full-text search on federated content 1 year ago
Nick Schonning 9ab2a775c9
Set CI concurrency at the job level (#23689) 1 year ago
dependabot[bot] 49b9ef0c1e
Bump oj from 3.13.23 to 3.14.2 (#23560) 1 year ago
Nick Schonning 8aee4de034
Autofix Rubocop Style/PerlBackrefs (#23649) 1 year ago
Nick Schonning a6f77aa28a
Autofix Rubocop Lint/AmbiguousOperatorPrecedence (#23681) 1 year ago
Nick Schonning e2567df860
Enable Lint/RedundantCopDisableDirective (#23687) 1 year ago
Nick Schonning d65b2c1924
Apply Rubocop Style/RedundantConstantBase (#23463) 1 year ago
Nick Schonning e4f37fad98
Only run latest for PR Rebase job (#23688) 1 year ago
Nick Schonning a7db0b41cd
Autofix Rubocop Lint/ParenthesesAsGroupedExpression (#23682) 1 year ago
Nick Schonning e5cf23cf3a
Enable Rubocop RSpec/HooksBeforeExamples (#23668) 1 year ago
Nick Schonning efd424506a
Autofix Rubocop Style/RedundantPercentQ (#23651) 1 year ago
Nick Schonning 7a941b42d3
Remove Style/Copyright Rubocop (#23665) 1 year ago
Nick Schonning c0a645f647
Autofix Rubocop RSpec/ExampleWording (#23667) 1 year ago
Nick Schonning 7a3d4c3d4b
Enable Rubocop RSpec/MultipleDescribes (#23672) 1 year ago
Nick Schonning 54318dcd6d
Autofix Rubocop RSpec/ClassCheck (#23685) 1 year ago
Nick Schonning 634368c491
Autofix Rubocop Lint/SymbolConversion (#23683) 1 year ago
Nick Schonning 6d42820e5d
Autofix Rubocop Lint/AmbiguousOperator (#23680) 1 year ago
Nick Schonning ac59d6f19f
Enable Rubocop Style/NumericLiterals (#23647) 1 year ago
Nick Schonning 669f6d2c0a
Run rubocop formatting except line length (#23632) 1 year ago
Nick Schonning 593bb8ce99
Autofix Rubocop Style/RaiseArgs (#23650) 1 year ago
Nick Schonning 6ed6c41724
Autofix Rubocop RSpec/EmptyLineAfterExample (#23661) 1 year ago
Nick Schonning 68b1071f86
Autofix Rubocop RSpec/BeNil (#23653) 1 year ago
Nick Schonning 936204b9ea
Autofix Rubocop Style/NestedParenthesizedCalls (#23646) 1 year ago
Nick Schonning 37914c8757
Autofix Rubocop Style/MethodCallWithoutArgsParentheses (#23645) 1 year ago
dependabot[bot] 4a1bad2fd8
Bump babel-jest from 29.4.2 to 29.4.3 (#23654) 1 year ago
dependabot[bot] 640d1aec1f
Bump jest-environment-jsdom from 29.4.2 to 29.4.3 (#23655) 1 year ago
dependabot[bot] 7cf3430e63
Bump webauthn from 2.5.2 to 3.0.0 (#23659) 1 year ago
dependabot[bot] df3faecb46
Bump jest from 29.4.2 to 29.4.3 (#23657) 1 year ago
dependabot[bot] 80ed656239
Bump yargs from 17.6.2 to 17.7.0 (#23656) 1 year ago
dependabot[bot] ba8b57050d
Bump sass from 1.58.0 to 1.58.2 (#23658) 1 year ago
Christian Schmidt cde13349cb
Fix bad type for spellCheck attribute (#23638) 1 year ago
Nick Schonning 2e93886537
Enable Depependabot on Docker images (#23553) 1 year ago
Thor ac10ef5e52 Merge remote-tracking branch 'upstream/main' into main 1 year ago
Nick Schonning 68a92c81bf
Generate minimimal Rubocop Todo file (#23629) 1 year ago
Nick Schonning 5e1c0c3d94
Enable ESLint Promise plugin defaults (#22229) 1 year ago
Nick Schonning 29ec2c4fb5
Trigger CI build on .nvmrc change (#23627) 1 year ago
Nick Schonning 1f957c6325
Use .nvmrc file for CI setup-node (#23562) 1 year ago
Eugen Rochko 630975bf41
New Crowdin updates (#23527) 1 year ago
Nick Schonning 418c3a4699
Move Jest tests to filtered GitHub Action (#23623) 1 year ago
Aaron Patterson fb8503e861
Upgrade to Ruby 3.2 (#22928) 1 year ago
Thijs Kinkhorst d15a9df6fe
Fix paths with url-encoded @ to redirect to the correct path (#23593) 1 year ago
Claire 66f715550e
Add `memorial` attribute to REST API (#23591) 1 year ago
dependabot[bot] 520c73c12f
Bump babel-jest from 29.4.1 to 29.4.2 (#23583) 1 year ago
dependabot[bot] 6f34fdcd86
Bump jest-environment-jsdom from 29.4.1 to 29.4.2 (#23582) 1 year ago
dependabot[bot] a4f22e4343
Bump jest from 29.4.1 to 29.4.2 (#23585) 1 year ago
dependabot[bot] 526361a5e9
Bump prettier from 2.8.3 to 2.8.4 (#23584) 1 year ago
dependabot[bot] cfad64daeb
Bump webpack-bundle-analyzer from 4.7.0 to 4.8.0 (#23581) 1 year ago
dependabot[bot] 64f9ced09f
Bump axios from 1.3.2 to 1.3.3 (#23580) 1 year ago
dependabot[bot] 14ad013f5e
Bump ws from 8.12.0 to 8.12.1 (#23579) 1 year ago
dependabot[bot] 93e36c0d55
Bump stylelint-config-standard-scss from 7.0.0 to 7.0.1 (#23578) 1 year ago
dependabot[bot] 737fbe5c02
Bump nokogiri from 1.14.1 to 1.14.2 (#23577) 1 year ago
dependabot[bot] 7bc946e8da
Bump aws-sdk-s3 from 1.119.0 to 1.119.1 (#23586) 1 year ago
Dean Bassett 40fc917a86 [Glitch] Fix case-sensitive check for previously used hashtags 1 year ago
Claire 58291b31fa [Glitch] Fix attached media uploads not being cleared when replying to a post 1 year ago
Claire ce84d163cc Merge branch 'main' into glitch-soc/merge-upstream 1 year ago
Claire d6930b3847
Add API parameter to safeguard unexpect mentions in new posts (#18350) 1 year ago
Shlee c84f38abc4
chewy from 7.2.4 to 7.2.7 (#23572) 1 year ago
Varun Sharma 45e2936c89
Add tests to indicate inclusion of self replies in statuses endpoint (#23266) 1 year ago
Stan Hu f553b064e0
Switch OpenID Connect gems (#23223) 1 year ago
Nick Schonning eddfb33dfe
Enable ESLint import recommended rules (#23315) 1 year ago
Nick Schonning db2c58d47a
Enable ESLint no-useless-escape (#23311) 1 year ago
Dean Bassett 4da5f77d92
Fix case-sensitive check for previously used hashtags (#23526) 1 year ago
Nick Schonning 841263a548
Update Ruby to 3.0.5 (#23544) 1 year ago
Jeong Arm 5f56818f9e
Change followed_by link to location=all if account is local on /admin/accounts/:id page (#23467) 1 year ago
dependabot[bot] 93d7c26fa5
Bump rubocop from 1.44.1 to 1.45.1 (#23523) 1 year ago
Claire cc92c65d83
Add dependency on net-http (#23571) 1 year ago
dependabot[bot] 66f2ad483c
Bump sidekiq-scheduler from 5.0.0 to 5.0.1 (#23569) 1 year ago
dependabot[bot] 31352f0d2c
Bump sidekiq-scheduler from 4.0.3 to 5.0.0 (#23212) 1 year ago
Claire c55568c75a
Add tests for `REST::AccountSerializer` (#23319) 1 year ago
Nick Schonning 7c5d396fca
Replace hamlit-rails with haml-rails (#23542) 1 year ago
Takeshi Umeda d874877b27
Update SECURITY.md (#23545) 1 year ago
Nick Schonning c6b7e04120
Sync Node.js to 16.19 patch release (#23554) 1 year ago
Nick Schonning a1c0573bc6
Yarn cache cleanup right after install in Docker (#23557) 1 year ago
Nick Schonning 0c9d455ea5
Upgrade to Stylelint 15 with Prettier (#23558) 1 year ago
Dean Bassett ee42505452
fix hashtag ordering (#2107) 1 year ago
Claire 8eb74c88ec
New Crowdin updates (#2100) 1 year ago
Nick Schonning c812cfa667
Enable EditorConfig trailing whitespace trimming (#23543) 1 year ago
Eugen Rochko e7b81d7d96
Bump blurhash from 0.1.6 to 0.1.7 (#23517) 1 year ago
emilweth 7c45145430
fix metrics format (#23520) 1 year ago
emilweth c1b823368c
dot is not allowed (#23519) 1 year ago
  1. 3
      .bundler-audit.yml
  2. 225
      .circleci/config.yml
  3. 39
      .codeclimate.yml
  4. 12
      .devcontainer/Dockerfile
  5. 33
      .devcontainer/devcontainer.json
  6. 24
      .devcontainer/docker-compose.yml
  7. 13
      .devcontainer/post-create.sh
  8. 8
      .devcontainer/welcome-message.txt
  9. 1
      .editorconfig
  10. 79
      .eslintrc.js
  11. 11
      .github/workflows/build-image.yml
  12. 28
      .github/workflows/check-i18n.yml
  13. 17
      .github/workflows/haml-lint-problem-matcher.json
  14. 3
      .github/workflows/lint-css.yml
  15. 46
      .github/workflows/lint-haml.yml
  16. 14
      .github/workflows/lint-js.yml
  17. 3
      .github/workflows/lint-json.yml
  18. 40
      .github/workflows/lint-md.yml
  19. 34
      .github/workflows/lint-ruby.yml
  20. 3
      .github/workflows/lint-yml.yml
  21. 17
      .github/workflows/rebase-needed.yml
  22. 43
      .github/workflows/test-js.yml
  23. 102
      .github/workflows/test-migrations-one-step.yml
  24. 110
      .github/workflows/test-migrations-two-step.yml
  25. 146
      .github/workflows/test-ruby.yml
  26. 103
      .haml-lint.yml
  27. 106
      .haml-lint_todo.yml
  28. 4
      .husky/pre-commit
  29. 2
      .nvmrc
  30. 36
      .prettierignore
  31. 556
      .rubocop.yml
  32. 2492
      .rubocop_todo.yml
  33. 2
      .ruby-version
  34. 3
      .yarnclean
  35. 121
      CHANGELOG.md
  36. 20
      CODE_OF_CONDUCT.md
  37. 28
      CONTRIBUTING.md
  38. 1
      Capfile
  39. 11
      Dockerfile
  40. 47
      Gemfile
  41. 389
      Gemfile.lock
  42. 4
      README.md
  43. 5
      SECURITY.md
  44. 12
      app/chewy/statuses_index.rb
  45. 12
      app/controllers/admin/dashboard_controller.rb
  46. 6
      app/controllers/admin/domain_blocks_controller.rb
  47. 6
      app/controllers/admin/email_domain_blocks_controller.rb
  48. 12
      app/controllers/api/v1/accounts/credentials_controller.rb
  49. 8
      app/controllers/api/v1/accounts/follower_accounts_controller.rb
  50. 8
      app/controllers/api/v1/accounts/following_accounts_controller.rb
  51. 8
      app/controllers/api/v1/accounts/statuses_controller.rb
  52. 2
      app/controllers/api/v1/accounts_controller.rb
  53. 4
      app/controllers/api/v1/admin/accounts_controller.rb
  54. 4
      app/controllers/api/v1/announcements_controller.rb
  55. 8
      app/controllers/api/v1/blocks_controller.rb
  56. 8
      app/controllers/api/v1/conversations_controller.rb
  57. 8
      app/controllers/api/v1/domain_blocks_controller.rb
  58. 4
      app/controllers/api/v1/emails/confirmations_controller.rb
  59. 8
      app/controllers/api/v1/endorsements_controller.rb
  60. 8
      app/controllers/api/v1/favourites_controller.rb
  61. 8
      app/controllers/api/v1/follow_requests_controller.rb
  62. 23
      app/controllers/api/v1/instances/translation_languages_controller.rb
  63. 8
      app/controllers/api/v1/lists/accounts_controller.rb
  64. 8
      app/controllers/api/v1/mutes_controller.rb
  65. 10
      app/controllers/api/v1/notifications_controller.rb
  66. 8
      app/controllers/api/v1/scheduled_statuses_controller.rb
  67. 8
      app/controllers/api/v1/statuses/favourited_by_accounts_controller.rb
  68. 8
      app/controllers/api/v1/statuses/reblogged_by_accounts_controller.rb
  69. 8
      app/controllers/api/v1/statuses_controller.rb
  70. 2
      app/controllers/api/v1/streaming_controller.rb
  71. 1
      app/controllers/api/v1/tags_controller.rb
  72. 2
      app/controllers/api/v1/timelines/public_controller.rb
  73. 12
      app/controllers/api/v1/trends/links_controller.rb
  74. 12
      app/controllers/api/v1/trends/statuses_controller.rb
  75. 12
      app/controllers/api/v1/trends/tags_controller.rb
  76. 4
      app/controllers/api/v2/admin/accounts_controller.rb
  77. 16
      app/controllers/application_controller.rb
  78. 13
      app/controllers/auth/confirmations_controller.rb
  79. 2
      app/controllers/auth/omniauth_callbacks_controller.rb
  80. 6
      app/controllers/auth/registrations_controller.rb
  81. 8
      app/controllers/auth/sessions_controller.rb
  82. 31
      app/controllers/backups_controller.rb
  83. 3
      app/controllers/concerns/account_controller_concern.rb
  84. 163
      app/controllers/concerns/cache_concern.rb
  85. 14
      app/controllers/concerns/rate_limit_headers.rb
  86. 1
      app/controllers/concerns/session_tracking_concern.rb
  87. 3
      app/controllers/concerns/signature_verification.rb
  88. 16
      app/controllers/concerns/two_factor_authentication_concern.rb
  89. 4
      app/controllers/filters/statuses_controller.rb
  90. 2
      app/controllers/media_controller.rb
  91. 2
      app/controllers/media_proxy_controller.rb
  92. 6
      app/controllers/relationships_controller.rb
  93. 18
      app/controllers/settings/flavours_controller.rb
  94. 43
      app/controllers/settings/preferences_controller.rb
  95. 9
      app/controllers/settings/two_factor_authentication/otp_authentication_controller.rb
  96. 4
      app/controllers/settings/two_factor_authentication/webauthn_credentials_controller.rb
  97. 5
      app/controllers/statuses_controller.rb
  98. 2
      app/controllers/tags_controller.rb
  99. 2
      app/helpers/accounts_helper.rb
  100. 11
      app/helpers/admin/announcements_helper.rb
  101. Some files were not shown because too many files have changed in this diff Show More

@ -0,0 +1,3 @@
---
ignore:
- CVE-2015-9284 # Mitigation following https://github.com/omniauth/omniauth/wiki/Resolving-CVE-2015-9284#mitigating-in-rails-applications

@ -1,225 +0,0 @@
version: 2.1
orbs:
ruby: circleci/ruby@2.0.0
node: circleci/node@5.0.3
executors:
default:
parameters:
ruby-version:
type: string
docker:
- image: cimg/ruby:<< parameters.ruby-version >>
environment:
BUNDLE_JOBS: 3
BUNDLE_RETRY: 3
CONTINUOUS_INTEGRATION: true
DB_HOST: localhost
DB_USER: root
DISABLE_SIMPLECOV: true
RAILS_ENV: test
- image: cimg/postgres:14.5
environment:
POSTGRES_USER: root
POSTGRES_HOST_AUTH_METHOD: trust
- image: cimg/redis:7.0
commands:
install-system-dependencies:
steps:
- run:
name: Install system dependencies
command: |
sudo apt-get update
sudo apt-get install -y libicu-dev libidn11-dev
install-ruby-dependencies:
parameters:
ruby-version:
type: string
steps:
- run:
command: |
bundle config clean 'true'
bundle config frozen 'true'
bundle config without 'development production'
name: Set bundler settings
- ruby/install-deps:
bundler-version: '2.3.26'
key: ruby<< parameters.ruby-version >>-gems-v1
wait-db:
steps:
- run:
command: dockerize -wait tcp://localhost:5432 -wait tcp://localhost:6379 -timeout 1m
name: Wait for PostgreSQL and Redis
jobs:
build:
docker:
- image: cimg/ruby:3.0-node
environment:
RAILS_ENV: test
steps:
- checkout
- install-system-dependencies
- install-ruby-dependencies:
ruby-version: '3.0'
- node/install-packages:
cache-version: v1
pkg-manager: yarn
- run:
command: |
export NODE_OPTIONS=--openssl-legacy-provider
./bin/rails assets:precompile
name: Precompile assets
- persist_to_workspace:
paths:
- public/assets
- public/packs-test
root: .
test:
parameters:
ruby-version:
type: string
executor:
name: default
ruby-version: << parameters.ruby-version >>
environment:
ALLOW_NOPAM: true
PAM_ENABLED: true
PAM_DEFAULT_SERVICE: pam_test
PAM_CONTROLLED_SERVICE: pam_test_controlled
parallelism: 4
steps:
- checkout
- install-system-dependencies
- run:
command: sudo apt-get install -y ffmpeg imagemagick libpam-dev
name: Install additional system dependencies
- run:
command: bundle config with 'pam_authentication'
name: Enable PAM authentication
- install-ruby-dependencies:
ruby-version: << parameters.ruby-version >>
- attach_workspace:
at: .
- wait-db
- run:
command: ./bin/rails db:create db:schema:load db:seed
name: Load database schema
- ruby/rspec-test
test-migrations:
executor:
name: default
ruby-version: '3.0'
steps:
- checkout
- install-system-dependencies
- install-ruby-dependencies:
ruby-version: '3.0'
- wait-db
- run:
command: ./bin/rails db:create
name: Create database
- run:
command: ./bin/rails db:migrate VERSION=20171010025614
name: Run migrations up to v2.0.0
- run:
command: ./bin/rails tests:migrations:populate_v2
name: Populate database with test data
- run:
command: ./bin/rails db:migrate VERSION=20180514140000
name: Run migrations up to v2.4.0
- run:
command: ./bin/rails tests:migrations:populate_v2_4
name: Populate database with test data
- run:
command: ./bin/rails db:migrate VERSION=20180707154237
name: Run migrations up to v2.4.3
- run:
command: ./bin/rails tests:migrations:populate_v2_4_3
name: Populate database with test data
- run:
command: ./bin/rails db:migrate
name: Run all remaining migrations
- run:
command: ./bin/rails tests:migrations:check_database
name: Check migration result
test-two-step-migrations:
executor:
name: default
ruby-version: '3.0'
steps:
- checkout
- install-system-dependencies
- install-ruby-dependencies:
ruby-version: '3.0'
- wait-db
- run:
command: ./bin/rails db:create
name: Create database
- run:
command: ./bin/rails db:migrate VERSION=20171010025614
name: Run migrations up to v2.0.0
- run:
command: ./bin/rails tests:migrations:populate_v2
name: Populate database with test data
- run:
command: ./bin/rails db:migrate VERSION=20180514140000
name: Run pre-deployment migrations up to v2.4.0
environment:
SKIP_POST_DEPLOYMENT_MIGRATIONS: true
- run:
command: ./bin/rails tests:migrations:populate_v2_4
name: Populate database with test data
- run:
command: ./bin/rails db:migrate VERSION=20180707154237
name: Run migrations up to v2.4.3
environment:
SKIP_POST_DEPLOYMENT_MIGRATIONS: true
- run:
command: ./bin/rails tests:migrations:populate_v2_4_3
name: Populate database with test data
- run:
command: ./bin/rails db:migrate
name: Run all remaining pre-deployment migrations
environment:
SKIP_POST_DEPLOYMENT_MIGRATIONS: true
- run:
command: ./bin/rails db:migrate
name: Run all post-deployment migrations
- run:
command: ./bin/rails tests:migrations:check_database
name: Check migration result
workflows:
version: 2
build-and-test:
jobs:
- build
- test:
matrix:
parameters:
ruby-version:
- '2.7'
- '3.0'
name: test-ruby<< matrix.ruby-version >>
requires:
- build
- test-migrations:
requires:
- build
- test-two-step-migrations:
requires:
- build
- node/run:
cache-version: v1
name: test-webui
pkg-manager: yarn
requires:
- build
version: '16.18'
yarn-run: test:jest

@ -1,39 +0,0 @@
version: '2'
checks:
argument-count:
enabled: false
complex-logic:
enabled: false
file-lines:
enabled: false
method-complexity:
enabled: false
method-count:
enabled: false
method-lines:
enabled: false
nested-control-flow:
enabled: false
return-statements:
enabled: false
similar-code:
enabled: false
identical-code:
enabled: false
plugins:
brakeman:
enabled: true
bundler-audit:
enabled: true
eslint:
enabled: false
rubocop:
enabled: false
sass-lint:
enabled: false
exclude_patterns:
- spec/
- vendor/asset/
- app/javascript/mastodon/locales/**/*.json
- config/locales/**/*.yml

@ -1,16 +1,14 @@
# [Choice] Ruby version (use -bullseye variants on local arm64/Apple Silicon): 3, 3.1, 3.0, 2, 2.7, 2.6, 3-bullseye, 3.1-bullseye, 3.0-bullseye, 2-bullseye, 2.7-bullseye, 2.6-bullseye, 3-buster, 3.1-buster, 3.0-buster, 2-buster, 2.7-buster, 2.6-buster
ARG VARIANT=3.1-bullseye
FROM mcr.microsoft.com/vscode/devcontainers/ruby:${VARIANT}
# For details, see https://github.com/devcontainers/images/tree/main/src/ruby
FROM mcr.microsoft.com/devcontainers/ruby:0-3.2-bullseye
# Install Rails
# RUN gem install rails webdrivers
# Default value to allow debug server to serve content over GitHub Codespace's port forwarding service
# The value is a comma-separated list of allowed domains
ENV RAILS_DEVELOPMENT_HOSTS=".githubpreview.dev"
ENV RAILS_DEVELOPMENT_HOSTS=".githubpreview.dev,.preview.app.github.dev,.app.github.dev"
# [Choice] Node.js version: lts/*, 18, 16, 14
ARG NODE_VERSION="lts/*"
ARG NODE_VERSION="16"
RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"
# [Optional] Uncomment this section to install additional OS packages.
@ -22,3 +20,5 @@ RUN gem install foreman
# [Optional] Uncomment this line to install global node packages.
RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g yarn" 2>&1
COPY welcome-message.txt /usr/local/etc/vscode-dev-containers/first-run-notice.txt

@ -1,24 +1,13 @@
// For more details, see https://aka.ms/devcontainer.json.
{
"name": "Mastodon",
"dockerComposeFile": "docker-compose.yml",
"service": "app",
"workspaceFolder": "/mastodon",
// Set *default* container specific settings.json values on container create.
"settings": {},
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"EditorConfig.EditorConfig",
"dbaeumer.vscode-eslint",
"rebornix.Ruby",
"webben.browserslist"
],
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
"ghcr.io/devcontainers/features/sshd:1": {
"version": "latest"
}
"ghcr.io/devcontainers/features/sshd:1": {}
},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
@ -26,8 +15,18 @@
"forwardPorts": [3000, 4000],
// Use 'postCreateCommand' to run commands after the container is created.
"onCreateCommand": "git config --global --add safe.directory ${containerWorkspaceFolder}",
"postCreateCommand": ".devcontainer/post-create.sh",
"waitFor": "postCreateCommand",
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode"
// Configure tool-specific properties.
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
// Set *default* container specific settings.json values on container create.
"settings": {},
// Add the IDs of extensions you want installed when the container is created.
"extensions": ["EditorConfig.EditorConfig", "webben.browserslist"]
}
}
}

@ -5,19 +5,12 @@ services:
build:
context: .
dockerfile: Dockerfile
args:
# Update 'VARIANT' to pick a version of Ruby: 3, 3.1, 3.0, 2, 2.7, 2.6
# Append -bullseye or -buster to pin to an OS version.
# Use -bullseye variants on local arm64/Apple Silicon.
VARIANT: '3.0-bullseye'
# Optional Node.js version to install
NODE_VERSION: '16'
volumes:
- ..:/mastodon:cached
- ../..:/workspaces:cached
environment:
RAILS_ENV: development
NODE_ENV: development
BIND: 0.0.0.0
REDIS_HOST: redis
REDIS_PORT: '6379'
DB_HOST: db
@ -30,10 +23,13 @@ services:
LIBRE_TRANSLATE_ENDPOINT: http://libretranslate:5000
# Overrides default command so things don't shut down after the process ends.
command: sleep infinity
ports:
- '127.0.0.1:3000:3000'
- '127.0.0.1:4000:4000'
- '127.0.0.1:80:3000'
networks:
- external_network
- internal_network
user: vscode
db:
image: postgres:14-alpine
@ -49,7 +45,7 @@ services:
- internal_network
redis:
image: redis:6-alpine
image: redis:7-alpine
restart: unless-stopped
volumes:
- redis-data:/data
@ -74,15 +70,19 @@ services:
hard: -1
libretranslate:
image: libretranslate/libretranslate:v1.2.9
image: libretranslate/libretranslate:v1.3.10
restart: unless-stopped
volumes:
- lt-data:/home/libretranslate/.local
networks:
- external_network
- internal_network
volumes:
postgres-data:
redis-data:
es-data:
lt-data:
networks:
external_network:

@ -3,17 +3,22 @@
set -e # Fail the whole script on first error
# Fetch Ruby gem dependencies
bundle install --path vendor/bundle --with='development test'
# Fetch Javascript dependencies
yarn install
bundle config path 'vendor/bundle'
bundle config with 'development test'
bundle install
# Make Gemfile.lock pristine again
git checkout -- Gemfile.lock
# Fetch Javascript dependencies
yarn --frozen-lockfile
# [re]create, migrate, and seed the test database
RAILS_ENV=test ./bin/rails db:setup
# [re]create, migrate, and seed the development database
RAILS_ENV=development ./bin/rails db:setup
# Precompile assets for development
RAILS_ENV=development ./bin/rails assets:precompile

@ -0,0 +1,8 @@
👋 Welcome to "Mastodon" in GitHub Codespaces!
🛠 Your environment is fully setup with all the required software.
🔍 To explore VS Code to its fullest, search using the Command Palette (Cmd/Ctrl + Shift + P or F1).
📝 Edit away, run your app as usual, and we'll automatically make it available for you to access.

@ -10,3 +10,4 @@ insert_final_newline = true
charset = utf-8
indent_style = space
indent_size = 2
trim_trailing_whitespace = true

@ -5,44 +5,47 @@ module.exports = {
'eslint:recommended',
'plugin:react/recommended',
'plugin:jsx-a11y/recommended',
'plugin:import/recommended',
'plugin:promise/recommended',
],
env: {
browser: true,
node: true,
es6: true,
jest: true,
},
globals: {
ATTACHMENT_HOST: false,
},
parser: '@babel/eslint-parser',
parser: '@typescript-eslint/parser',
plugins: [
'react',
'jsx-a11y',
'import',
'promise',
'@typescript-eslint',
],
parserOptions: {
sourceType: 'module',
ecmaFeatures: {
experimentalObjectRestSpread: true,
jsx: true,
},
ecmaVersion: 2021,
requireConfigFile: false,
babelOptions: {
configFile: false,
presets: ['@babel/react', '@babel/env'],
},
},
settings: {
react: {
version: 'detect',
},
'import/extensions': [
'.js',
],
'import/ignore': [
'node_modules',
'\\.(css|scss|json)$',
@ -50,6 +53,7 @@ module.exports = {
'import/resolver': {
node: {
paths: ['app/javascript'],
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
},
},
@ -90,7 +94,8 @@ module.exports = {
'no-self-assign': 'off',
'no-trailing-spaces': 'warn',
'no-unused-expressions': 'error',
'no-unused-vars': [
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{
vars: 'all',
@ -98,7 +103,6 @@ module.exports = {
ignoreRestSiblings: true,
},
],
'no-useless-escape': 'off',
'object-curly-spacing': ['error', 'always'],
'padded-blocks': [
'error',
@ -110,6 +114,7 @@ module.exports = {
semi: 'error',
'valid-typeof': 'error',
'react/jsx-filename-extension': ['error', { extensions: ['.jsx', 'tsx'] }],
'react/jsx-boolean-value': 'error',
'react/jsx-closing-bracket-location': ['error', 'line-aligned'],
'react/jsx-curly-spacing': 'error',
@ -178,11 +183,15 @@ module.exports = {
},
],
// See https://github.com/import-js/eslint-plugin-import/blob/main/config/recommended.js
'import/extensions': [
'error',
'always',
{
js: 'never',
jsx: 'never',
ts: 'never',
tsx: 'never',
},
],
'import/newline-after-import': 'error',
@ -191,19 +200,71 @@ module.exports = {
{
devDependencies: [
'config/webpack/**',
'app/javascript/mastodon/performance.js',
'app/javascript/mastodon/test_setup.js',
'app/javascript/**/__tests__/**',
],
},
],
'import/no-unresolved': 'error',
'import/no-webpack-loader-syntax': 'error',
'promise/always-return': 'off',
'promise/catch-or-return': [
'error',
{
allowFinally: true,
},
],
'promise/no-callback-in-promise': 'off',
'promise/no-nesting': 'off',
'promise/no-promise-in-callback': 'off',
},
overrides: [
{
files: [
'*.config.js',
'.*rc.js',
'ide-helper.js',
],
env: {
commonjs: true,
},
parserOptions: {
sourceType: 'script',
},
},
{
files: [
'**/*.ts',
'**/*.tsx',
],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react/recommended',
'plugin:jsx-a11y/recommended',
'plugin:import/recommended',
'plugin:import/typescript',
'plugin:promise/recommended',
],
rules: {
'@typescript-eslint/no-explicit-any': 'off',
},
},
{
files: [
'**/__tests__/*.js',
'**/__tests__/*.jsx',
],
env: {
jest: true,
},
},
],
};

@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.ref }}
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
steps:
@ -25,12 +25,15 @@ jobs:
- uses: hadolint/hadolint-action@v3.1.0
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2
- uses: docker/login-action@v2
- name: Log in to the Github Container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
if: github.event_name != 'pull_request'
- uses: docker/metadata-action@v4
id: meta
with:
@ -39,6 +42,7 @@ jobs:
type=raw,value=latest,enable={{is_default_branch}}
type=edge,branch=main
type=sha,prefix=,format=long
- uses: docker/build-push-action@v4
with:
context: .
@ -47,5 +51,6 @@ jobs:
builder: ${{ steps.buildx.outputs.name }}
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max

@ -14,24 +14,50 @@ permissions:
jobs:
check-i18n:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y libicu-dev libidn11-dev
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: .ruby-version
bundler-cache: true
- name: Set up Node.js
uses: actions/setup-node@v3
with:
cache: yarn
node-version-file: '.nvmrc'
- name: Install all yarn packages
run: yarn --frozen-lockfile
- name: Check for missing strings in English JSON
run: |
yarn build:development
yarn manage:translations
git diff --exit-code
- name: Check locale file normalization
run: bundle exec i18n-tasks check-normalized
- name: Check for unused strings
run: bundle exec i18n-tasks unused
- name: Check for missing strings in English YML
run: |
bundle exec i18n-tasks add-missing -l en
git diff --exit-code
- name: Check for wrong string interpolations
run: bundle exec i18n-tasks check-consistent-interpolations
- name: Check that all required locale files exist
run: bundle exec rake repo:check_locales_files

@ -0,0 +1,17 @@
{
"problemMatcher": [
{
"owner": "haml-lint",
"severity": "warning",
"pattern": [
{
"regexp": "^(.*):(\\d+)\\s\\[W]\\s(.*):\\s(.*)$",
"file": 1,
"line": 2,
"code": 3,
"message": 4
}
]
}
]
}

@ -6,6 +6,7 @@ on:
paths:
- 'package.json'
- 'yarn.lock'
- '.nvmrc'
- '.prettier*'
- 'stylelint.config.js'
- '**/*.css'
@ -17,6 +18,7 @@ on:
paths:
- 'package.json'
- 'yarn.lock'
- '.nvmrc'
- '.prettier*'
- 'stylelint.config.js'
- '**/*.css'
@ -36,6 +38,7 @@ jobs:
uses: actions/setup-node@v3
with:
cache: yarn
node-version-file: '.nvmrc'
- name: Install all yarn packages
run: yarn --frozen-lockfile

@ -0,0 +1,46 @@
name: Haml Linting
on:
push:
branches-ignore:
- 'dependabot/**'
paths:
- '.github/workflows/haml-lint-problem-matcher.json'
- '.github/workflows/lint-haml.yml'
- '.haml-lint*.yml'
- '.rubocop*.yml'
- '.ruby-version'
- '**/*.haml'
- 'Gemfile*'
pull_request:
paths:
- '.github/workflows/haml-lint-problem-matcher.json'
- '.github/workflows/lint-haml.yml'
- '.haml-lint*.yml'
- '.rubocop*.yml'
- '.ruby-version'
- '**/*.haml'
- 'Gemfile*'
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Install native Ruby dependencies
run: |
sudo apt-get update
sudo apt-get install -y libicu-dev libidn11-dev
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: .ruby-version
bundler-cache: true
- name: Run haml-lint
run: |
echo "::add-matcher::.github/workflows/haml-lint-problem-matcher.json"
bundle exec haml-lint

@ -6,18 +6,28 @@ on:
paths:
- 'package.json'
- 'yarn.lock'
- 'tsconfig.json'
- '.nvmrc'
- '.prettier*'
- '.eslint*'
- '**/*.js'
- '**/*.jsx'
- '**/*.ts'
- '**/*.tsx'
- '.github/workflows/lint-js.yml'
pull_request:
paths:
- 'package.json'
- 'yarn.lock'
- 'tsconfig.json'
- '.nvmrc'
- '.prettier*'
- '.eslint*'
- '**/*.js'
- '**/*.jsx'
- '**/*.ts'
- '**/*.tsx'
- '.github/workflows/lint-js.yml'
jobs:
@ -32,9 +42,13 @@ jobs:
uses: actions/setup-node@v3
with:
cache: yarn
node-version-file: '.nvmrc'
- name: Install all yarn packages
run: yarn --frozen-lockfile
- name: ESLint
run: yarn test:lint:js
- name: Typecheck
run: yarn test:typecheck

@ -6,6 +6,7 @@ on:
paths:
- 'package.json'
- 'yarn.lock'
- '.nvmrc'
- '.prettier*'
- '**/*.json'
- '.github/workflows/lint-json.yml'
@ -15,6 +16,7 @@ on:
paths:
- 'package.json'
- 'yarn.lock'
- '.nvmrc'
- '.prettier*'
- '**/*.json'
- '.github/workflows/lint-json.yml'
@ -32,6 +34,7 @@ jobs:
uses: actions/setup-node@v3
with:
cache: yarn
node-version-file: '.nvmrc'
- name: Install all yarn packages
run: yarn --frozen-lockfile

@ -0,0 +1,40 @@
name: Markdown Linting
on:
push:
branches-ignore:
- 'dependabot/**'
paths:
- '.github/workflows/lint-md.yml'
- '.prettier*'
- '**/*.md'
- '!AUTHORS.md'
- 'package.json'
- 'yarn.lock'
pull_request:
paths:
- '.github/workflows/lint-md.yml'
- '.prettier*'
- '**/*.md'
- '!AUTHORS.md'
- 'package.json'
- 'yarn.lock'
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
cache: yarn
- name: Install all yarn packages
run: yarn --frozen-lockfile
- name: Prettier
run: yarn prettier --check "**/*.md"

@ -5,7 +5,9 @@ on:
- 'dependabot/**'
paths:
- 'Gemfile*'
- '.rubocop.yml'
- '.rubocop*.yml'
- '.ruby-version'
- '.bundler-audit.yml'
- '**/*.rb'
- '**/*.rake'
- '.github/workflows/lint-ruby.yml'
@ -13,7 +15,9 @@ on:
pull_request:
paths:
- 'Gemfile*'
- '.rubocop.yml'
- '.rubocop*.yml'
- '.ruby-version'
- '.bundler-audit.yml'
- '**/*.rb'
- '**/*.rake'
- '.github/workflows/lint-ruby.yml'
@ -21,21 +25,25 @@ on:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
- name: Clone repository
uses: actions/checkout@v3
- name: Install native Ruby dependencies
run: sudo apt-get install -y libicu-dev libidn11-dev
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
fetch-depth: 0
ruby-version: .ruby-version
bundler-cache: true
- name: Set-up RuboCop Problem Mathcher
- name: Set-up RuboCop Problem Matcher
uses: r7kamura/rubocop-problem-matchers-action@v1
- name: Run rubocop
uses: github/super-linter@v4
env:
DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
LINTER_RULES_PATH: .
RUBY_CONFIG_FILE: .rubocop.yml
VALIDATE_ALL_CODEBASE: false
VALIDATE_RUBY: true
run: bundle exec rubocop
- name: Run bundler-audit
run: bundle exec bundler-audit

@ -6,6 +6,7 @@ on:
paths:
- 'package.json'
- 'yarn.lock'
- '.nvmrc'
- '.prettier*'
- '**/*.yaml'
- '**/*.yml'
@ -16,6 +17,7 @@ on:
paths:
- 'package.json'
- 'yarn.lock'
- '.nvmrc'
- '.prettier*'
- '**/*.yaml'
- '**/*.yml'
@ -34,6 +36,7 @@ jobs:
uses: actions/setup-node@v3
with:
cache: yarn
node-version-file: '.nvmrc'
- name: Install all yarn packages
run: yarn --frozen-lockfile

@ -2,16 +2,33 @@ name: PR Needs Rebase
on:
push:
branches-ignore:
- 'dependabot/**'
- 'l10n_main'
pull_request_target:
branches-ignore:
- 'dependabot/**'
- 'l10n_main'
types: [synchronize]
permissions:
pull-requests: write
jobs:
label-rebase-needed:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
steps:
- name: Check for merge conflicts
uses: eps1lon/actions-label-merge-conflict@releases/2.x
with:
dirtyLabel: 'rebase needed :construction:'
repoToken: '${{ secrets.GITHUB_TOKEN }}'
commentOnClean: This pull request has resolved merge conflicts and is ready for review.
commentOnDirty: This pull request has merge conflicts that must be resolved before it can be merged.
retryMax: 10
continueOnMissingPermissions: false

@ -0,0 +1,43 @@
name: JavaScript Testing
on:
push:
branches-ignore:
- 'dependabot/**'
paths:
- 'package.json'
- 'yarn.lock'
- '.nvmrc'
- '**/*.js'
- '**/*.jsx'
- '**/*.snap'
- '.github/workflows/test-js.yml'
pull_request:
paths:
- 'package.json'
- 'yarn.lock'
- '.nvmrc'
- '**/*.js'
- '**/*.jsx'
- '**/*.snap'
- '.github/workflows/test-js.yml'
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
cache: yarn
node-version-file: '.nvmrc'
- name: Install all yarn packages
run: yarn --frozen-lockfile
- name: Jest testing
run: yarn test:jest --reporters github-actions summary

@ -0,0 +1,102 @@
name: Test one step migrations
on:
push:
branches-ignore:
- 'dependabot/**'
pull_request:
jobs:
pre_job:
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v5
with:
paths: '["Gemfile*", ".ruby-version", "**/*.rb", ".github/workflows/test-migrations-one-step.yml", "lib/tasks/tests.rake"]'
test:
runs-on: ubuntu-latest
needs: pre_job
if: needs.pre_job.outputs.should_skip != 'true'
services:
postgres:
image: postgres:14-alpine
env:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
redis:
image: redis:7-alpine
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379
env:
CONTINUOUS_INTEGRATION: true
DB_HOST: localhost
DB_USER: postgres
DB_PASS: postgres
DISABLE_SIMPLECOV: true
RAILS_ENV: test
BUNDLE_CLEAN: true
BUNDLE_FROZEN: true
BUNDLE_WITHOUT: 'development production'
BUNDLE_JOBS: 3
BUNDLE_RETRY: 3
steps:
- uses: actions/checkout@v3
- name: Install native Ruby dependencies
run: |
sudo apt-get update
sudo apt-get install -y libicu-dev libidn11-dev
- name: Set up bundler cache
uses: ruby/setup-ruby@v1
with:
ruby-version: .ruby-version
bundler-cache: true
- name: Create database
run: './bin/rails db:create'
- name: Run migrations up to v2.0.0
run: './bin/rails db:migrate VERSION=20171010025614'
- name: Populate database with test data
run: './bin/rails tests:migrations:populate_v2'
- name: Run migrations up to v2.4.0
run: './bin/rails db:migrate VERSION=20180514140000'
- name: Populate database with test data
run: './bin/rails tests:migrations:populate_v2_4'
- name: Run migrations up to v2.4.3
run: './bin/rails db:migrate VERSION=20180707154237'
- name: Populate database with test data
run: './bin/rails tests:migrations:populate_v2_4_3'
- name: Run all remaining migrations
run: './bin/rails db:migrate'
- name: Check migration result
run: './bin/rails tests:migrations:check_database'

@ -0,0 +1,110 @@
name: Test two step migrations
on:
push:
branches-ignore:
- 'dependabot/**'
pull_request:
jobs:
pre_job:
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v5
with:
paths: '["Gemfile*", ".ruby-version", "**/*.rb", ".github/workflows/test-migrations-two-step.yml", "lib/tasks/tests.rake"]'
test:
runs-on: ubuntu-latest
needs: pre_job
if: needs.pre_job.outputs.should_skip != 'true'
services:
postgres:
image: postgres:14-alpine
env:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
redis:
image: redis:7-alpine
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379
env:
CONTINUOUS_INTEGRATION: true
DB_HOST: localhost
DB_USER: postgres
DB_PASS: postgres
DISABLE_SIMPLECOV: true
RAILS_ENV: test
BUNDLE_CLEAN: true
BUNDLE_FROZEN: true
BUNDLE_WITHOUT: 'development production'
BUNDLE_JOBS: 3
BUNDLE_RETRY: 3
steps:
- uses: actions/checkout@v3
- name: Install native Ruby dependencies
run: |
sudo apt-get update
sudo apt-get install -y libicu-dev libidn11-dev
- name: Set up bundler cache
uses: ruby/setup-ruby@v1
with:
ruby-version: .ruby-version
bundler-cache: true
- name: Create database
run: './bin/rails db:create'
- name: Run migrations up to v2.0.0
run: './bin/rails db:migrate VERSION=20171010025614'
- name: Populate database with test data
run: './bin/rails tests:migrations:populate_v2'
- name: Run pre-deployment migrations up to v2.4.0
run: './bin/rails db:migrate VERSION=20180514140000'
env:
SKIP_POST_DEPLOYMENT_MIGRATIONS: true
- name: Populate database with test data
run: './bin/rails tests:migrations:populate_v2_4'
- name: Run migrations up to v2.4.3
run: './bin/rails db:migrate VERSION=20180707154237'
env:
SKIP_POST_DEPLOYMENT_MIGRATIONS: true
- name: Populate database with test data
run: './bin/rails tests:migrations:populate_v2_4_3'
- name: Run all remaining pre-deployment migrations
run: './bin/rails db:migrate'
env:
SKIP_POST_DEPLOYMENT_MIGRATIONS: true
- name: Run all post-deployment migrations
run: './bin/rails db:migrate'
- name: Check migration result
run: './bin/rails tests:migrations:check_database'

@ -0,0 +1,146 @@
name: Ruby Testing
on:
push:
branches-ignore:
- 'dependabot/**'
pull_request:
env:
BUNDLE_CLEAN: true
BUNDLE_FROZEN: true
BUNDLE_WITHOUT: 'development production'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
env:
RAILS_ENV: test
steps:
- uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
cache: yarn
node-version-file: '.nvmrc'
- name: Install native Ruby dependencies
run: |
sudo apt-get update
sudo apt-get install -y libicu-dev libidn11-dev
- name: Set up bundler cache
uses: ruby/setup-ruby@v1
with:
ruby-version: .ruby-version
bundler-cache: true
- run: yarn --frozen-lockfile --production
- name: Precompile assets
# Previously had set this, but it's not supported
# export NODE_OPTIONS=--openssl-legacy-provider
run: |-
./bin/rails assets:precompile
- uses: actions/upload-artifact@v3
with:
path: |-
./public/assets
./public/packs-test
name: ${{ github.sha }}
retention-days: 0
test:
runs-on: ubuntu-latest
needs:
- build
services:
postgres:
image: postgres:14-alpine
env:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
redis:
image: redis:7-alpine
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379
env:
DB_HOST: localhost
DB_USER: postgres
DB_PASS: postgres
DISABLE_SIMPLECOV: true
RAILS_ENV: test
ALLOW_NOPAM: true
PAM_ENABLED: true
PAM_DEFAULT_SERVICE: pam_test
PAM_CONTROLLED_SERVICE: pam_test_controlled
BUNDLE_WITH: 'pam_authentication'
CI_JOBS: ${{ matrix.ci_job }}/4
strategy:
fail-fast: false
matrix:
ruby-version:
- '2.7'
- '3.0'
- '3.1'
- '.ruby-version'
ci_job:
- 1
- 2
- 3
- 4
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
path: './public'
name: ${{ github.sha }}
- name: Update package index
run: sudo apt-get update
- name: Install native Ruby dependencies
run: sudo apt-get install -y libicu-dev libidn11-dev
- name: Install additional system dependencies
run: sudo apt-get install -y ffmpeg imagemagick libpam-dev
- name: Set up bundler cache
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version}}
bundler-cache: true
- name: Update system gems
if: matrix.ruby-version == '2.7'
run: gem update --system
- name: Load database schema
run: './bin/rails db:create db:schema:load db:seed'
- run: bundle exec rake rspec_chunked

@ -1,108 +1,9 @@
# Whether to ignore frontmatter at the beginning of HAML documents for
# frameworks such as Jekyll/Middleman
skip_frontmatter: false
inherits_from: .haml-lint_todo.yml
exclude:
- 'vendor/**/*'
- 'spec/**/*'
- 'lib/templates/**/*'
- 'app/views/kaminari/**/*'
- lib/templates/haml/scaffold/_form.html.haml
linters:
AltText:
enabled: false
ClassAttributeWithStaticValue:
enabled: true
ClassesBeforeIds:
enabled: true
ConsecutiveComments:
enabled: true
ConsecutiveSilentScripts:
enabled: true
max_consecutive: 2
EmptyObjectReference:
enabled: true
EmptyScript:
enabled: true
FinalNewline:
enabled: true
present: true
HtmlAttributes:
enabled: true
ImplicitDiv:
enabled: true
LeadingCommentSpace:
enabled: true
LineLength:
enabled: false
max: 80
MultilinePipe:
enabled: true
MultilineScript:
enabled: true
ObjectReferenceAttributes:
enabled: true
RuboCop:
enabled: true
# These cops are incredibly noisy when it comes to HAML templates, so we
# ignore them.
ignored_cops:
- Lint/BlockAlignment
- Lint/EndAlignment
- Lint/Void
- Metrics/BlockLength
- Metrics/LineLength
- Style/AlignParameters
- Style/BlockNesting
- Style/ElseAlignment
- Style/EndOfLine
- Style/FileName
- Style/FinalNewline
- Style/FrozenStringLiteralComment
- Style/IfUnlessModifier
- Style/IndentationWidth
- Style/Next
- Style/TrailingBlankLines
- Style/TrailingWhitespace
- Style/WhileUntilModifier
RubyComments:
enabled: true
SpaceBeforeScript:
enabled: true
SpaceInsideHashAttributes:
enabled: true
style: space
Indentation:
enabled: true
character: space # or tab
TagName:
enabled: true
TrailingWhitespace:
enabled: true
UnnecessaryInterpolation:
enabled: true
UnnecessaryStringOutput:
enabled: true

@ -0,0 +1,106 @@
# This configuration was generated by
# `haml-lint --auto-gen-config`
# on 2023-03-15 00:55:01 -0400 using Haml-Lint version 0.45.0.
# The point is for the user to remove these configuration records
# one by one as the lints are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of Haml-Lint, may require this file to be generated again.
linters:
# Offense count: 63
RuboCop:
exclude:
- 'app/views/accounts/_og.html.haml'
- 'app/views/admin/account_warnings/_account_warning.html.haml'
- 'app/views/admin/accounts/index.html.haml'
- 'app/views/admin/accounts/show.html.haml'
- 'app/views/admin/announcements/edit.html.haml'
- 'app/views/admin/announcements/new.html.haml'
- 'app/views/admin/disputes/appeals/_appeal.html.haml'
- 'app/views/admin/domain_blocks/edit.html.haml'
- 'app/views/admin/domain_blocks/new.html.haml'
- 'app/views/admin/ip_blocks/new.html.haml'
- 'app/views/admin/reports/actions/preview.html.haml'
- 'app/views/admin/reports/index.html.haml'
- 'app/views/admin/reports/show.html.haml'
- 'app/views/admin/roles/_form.html.haml'
- 'app/views/admin/settings/about/show.html.haml'
- 'app/views/admin/settings/appearance/show.html.haml'
- 'app/views/admin/settings/registrations/show.html.haml'
- 'app/views/admin/statuses/show.html.haml'
- 'app/views/auth/registrations/new.html.haml'
- 'app/views/disputes/strikes/show.html.haml'
- 'app/views/filters/_filter_fields.html.haml'
- 'app/views/invites/_form.html.haml'
- 'app/views/layouts/application.html.haml'
- 'app/views/layouts/error.html.haml'
- 'app/views/notification_mailer/_status.html.haml'
- 'app/views/settings/applications/_fields.html.haml'
- 'app/views/settings/imports/show.html.haml'
- 'app/views/settings/preferences/appearance/show.html.haml'
- 'app/views/settings/preferences/other/show.html.haml'
- 'app/views/statuses/_detailed_status.html.haml'
- 'app/views/statuses/_poll.html.haml'
- 'app/views/statuses/show.html.haml'
- 'app/views/statuses_cleanup/show.html.haml'
- 'app/views/user_mailer/warning.html.haml'
# Offense count: 913
LineLength:
enabled: false
# Offense count: 22
UnnecessaryStringOutput:
exclude:
- 'app/views/accounts/show.html.haml'
- 'app/views/admin/custom_emojis/_custom_emoji.html.haml'
- 'app/views/admin/relays/_relay.html.haml'
- 'app/views/admin/rules/_rule.html.haml'
- 'app/views/admin/statuses/index.html.haml'
- 'app/views/auth/registrations/_sessions.html.haml'
- 'app/views/disputes/strikes/show.html.haml'
- 'app/views/notification_mailer/_status.html.haml'
- 'app/views/settings/two_factor_authentication_methods/index.html.haml'
- 'app/views/statuses/_detailed_status.html.haml'
- 'app/views/statuses/_poll.html.haml'
- 'app/views/statuses/_simple_status.html.haml'
- 'app/views/user_mailer/suspicious_sign_in.html.haml'
- 'app/views/user_mailer/webauthn_credential_added.html.haml'
- 'app/views/user_mailer/webauthn_credential_deleted.html.haml'
- 'app/views/user_mailer/welcome.html.haml'
# Offense count: 3
ViewLength:
exclude:
- 'app/views/admin/accounts/show.html.haml'
- 'app/views/admin/reports/show.html.haml'
- 'app/views/disputes/strikes/show.html.haml'
# Offense count: 41
InstanceVariables:
exclude:
- 'app/views/admin/reports/_actions.html.haml'
- 'app/views/admin/roles/_form.html.haml'
- 'app/views/admin/webhooks/_form.html.haml'
- 'app/views/auth/registrations/_sessions.html.haml'
- 'app/views/auth/registrations/_status.html.haml'
- 'app/views/auth/sessions/two_factor/_otp_authentication_form.html.haml'
- 'app/views/authorize_interactions/_post_follow_actions.html.haml'
- 'app/views/invites/_form.html.haml'
- 'app/views/relationships/_account.html.haml'
- 'app/views/shared/_og.html.haml'
- 'app/views/statuses/_status.html.haml'
# Offense count: 6
ConsecutiveSilentScripts:
exclude:
- 'app/views/admin/settings/shared/_links.html.haml'
- 'app/views/settings/login_activities/_login_activity.html.haml'
- 'app/views/statuses/_poll.html.haml'
# Offense count: 3
IdNames:
exclude:
- 'app/views/authorize_interactions/error.html.haml'
- 'app/views/oauth/authorizations/error.html.haml'
- 'app/views/shared/_error_messages.html.haml'

@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
yarn lint-staged

@ -1 +1 @@
16
16.20

@ -51,15 +51,8 @@
*~
*.swp
# Ignore npm debug log
npm-debug.log
# Ignore yarn log files
yarn-error.log
yarn-debug.log
# Ignore vagrant log files
*-cloudimg-console.log
# Ignore log files
*.log
# Ignore Docker option files
docker-compose.override.yml
@ -71,9 +64,30 @@ docker-compose.override.yml
/app/javascript/mastodon/locales
/config/locales
# Ignore vendored CSS reset
app/javascript/styles/mastodon/reset.scss
# Ignore Javascript pending https://github.com/mastodon/mastodon/pull/23631
*.js
*.jsx
*.ts
*.tsx
# Ignore HTML till cleaned and included in CI
*.html
# Ignore the generated AUTHORS.md
AUTHORS.md
# Ignore glitch-soc emoji map file
/app/javascript/flavours/glitch/features/emoji/emoji_map.json
# Ignore glitch-soc locale files
/app/javascript/flavours/glitch/locales
/config/locales-glitch
# Ignore glitch-soc emoji map file
/app/javascript/flavours/glitch/features/emoji/emoji_map.json
# Ignore glitch-soc vendored CSS reset
app/javascript/flavours/glitch/styles/reset.scss
# Ignore win95 theme
app/javascript/styles/win95.scss

@ -1,479 +1,261 @@
# Can be removed once all rules are addressed or moved to this file as documented overrides
inherit_from: .rubocop_todo.yml
# Used for merging with exclude lists with .rubocop_todo.yml
inherit_mode:
merge:
- Exclude
require:
- rubocop-rails
- rubocop-rspec
- rubocop-performance
- rubocop-capybara
AllCops:
TargetRubyVersion: 2.7
TargetRubyVersion: 2.7 # Set to minimum supported version of CI
DisplayCopNames: true
DisplayStyleGuide: true
ExtraDetails: true
UseCache: true
CacheRootDirectory: tmp
NewCops: enable
NewCops: enable # Opt-in to newly added rules
Exclude:
- db/schema.rb
- 'app/views/**/*'
- 'config/**/*'
- 'bin/*'
- 'Rakefile'
- 'node_modules/**/*'
- 'Vagrantfile'
- 'vendor/**/*'
- 'lib/json_ld/*'
- 'lib/json_ld/*' # Generated files
- 'lib/templates/**/*'
Bundler/OrderedGems:
Enabled: false
Layout/AccessModifierIndentation:
EnforcedStyle: indent
Layout/EmptyLineAfterMagicComment:
Enabled: false
Layout/EmptyLineAfterGuardClause:
Enabled: false
Layout/EmptyLineBetweenDefs:
AllowAdjacentOneLineDefs: true
Layout/EmptyLinesAroundAttributeAccessor:
Enabled: true
# Reason: Prefer Hashes without extreme indentation
# https://docs.rubocop.org/rubocop/cops_layout.html#layoutfirsthashelementindentation
Layout/FirstHashElementIndentation:
EnforcedStyle: consistent
Layout/HashAlignment:
Enabled: false
Layout/SpaceAroundMethodCallOperator:
Enabled: true
Layout/SpaceInsideHashLiteralBraces:
EnforcedStyle: space
Lint/DeprecatedOpenSSLConstant:
Enabled: true
Lint/DuplicateElsifCondition:
Enabled: true
Lint/MixedRegexpCaptureTypes:
Enabled: true
Lint/RaiseException:
Enabled: true
Lint/StructNewOverride:
Enabled: true
# Reason: Currently disabled in .rubocop_todo.yml
# https://docs.rubocop.org/rubocop/cops_layout.html#layoutlinelength
Layout/LineLength:
AllowedPatterns:
# Allow comments to be long lines
- !ruby/regexp / \# .*$/
- !ruby/regexp /^\# .*$/
Exclude:
- lib/**/*cli*.rb
- db/*migrate/**/*
- db/seeds/**/*
# Reason:
# https://docs.rubocop.org/rubocop/cops_lint.html#lintuselessaccessmodifier
Lint/UselessAccessModifier:
ContextCreatingMethods:
- class_methods
# Reason: Currently disabled in .rubocop_todo.yml
# https://docs.rubocop.org/rubocop/cops_metrics.html#metricsabcsize
Metrics/AbcSize:
Max: 34 # RuboCop default 17
Exclude:
- 'lib/**/*cli*.rb'
- db/*migrate/**/*
- lib/paperclip/color_extractor.rb
- app/workers/scheduler/follow_recommendations_scheduler.rb
- app/services/activitypub/fetch*_service.rb
- lib/paperclip/**/*
CountRepeatedAttributes: false
AllowedMethods:
- update_media_attachments!
- account_link_to
- attempt_oembed
- build_crutches
- calculate_scores
- cc
- dump_actor!
- filter_from_home?
- hydrate
- import_bookmarks!
- import_relationships!
- initialize
- link_to_mention
- log_target
- matches_time_window?
- parse_metadata
- perform_statuses_search!
- privatize_media_attachments!
- process_update
- publish_media_attachments!
- remotable_attachment
- render_initial_state
- render_with_cache
- searchable_by
- self.cached_filters_for
- set_fetchable_attributes!
- signed_request_actor
- statuses_to_delete
- update_poll!
# Reason: Some functions cannot be broken up, but others may be refactor candidates
# https://docs.rubocop.org/rubocop/cops_metrics.html#metricsblocklength
Metrics/BlockLength:
Max: 55
CountAsOne: ['array', 'hash', 'heredoc', 'method_call']
Exclude:
- 'lib/mastodon/*_cli.rb'
CountComments: false
CountAsOne: [array, heredoc]
AllowedMethods:
- task
- namespace
- class_methods
- included
- 'lib/tasks/*.rake'
- 'app/models/concerns/account_associations.rb'
- 'app/models/concerns/account_interactions.rb'
- 'app/models/concerns/ldap_authenticable.rb'
- 'app/models/concerns/omniauthable.rb'
- 'app/models/concerns/pam_authenticable.rb'
- 'app/models/concerns/remotable.rb'
- 'app/services/suspend_account_service.rb'
- 'app/services/unsuspend_account_service.rb'
- 'app/views/accounts/show.rss.ruby'
- 'app/views/tags/show.rss.ruby'
- 'config/environments/development.rb'
- 'config/environments/production.rb'
- 'config/initializers/devise.rb'
- 'config/initializers/doorkeeper.rb'
- 'config/initializers/omniauth.rb'
- 'config/initializers/simple_form.rb'
- 'config/navigation.rb'
- 'config/routes.rb'
- 'db/post_migrate/20221101190723_backfill_admin_action_logs.rb'
- 'db/post_migrate/20221206114142_backfill_admin_action_logs_again.rb'
- 'lib/paperclip/gif_transcoder.rb'
# Reason:
# https://docs.rubocop.org/rubocop/cops_metrics.html#metricsblocknesting
Metrics/BlockNesting:
Max: 3
Exclude:
- 'lib/mastodon/*_cli.rb'
# Reason: Some Excluded files would be candidates for refactoring but not currently addressed
# https://docs.rubocop.org/rubocop/cops_metrics.html#metricsclasslength
Metrics/ClassLength:
CountComments: false
Max: 500
CountAsOne: [array, heredoc]
CountAsOne: ['array', 'hash', 'heredoc', 'method_call']
Exclude:
- 'lib/mastodon/*_cli.rb'
- 'app/controllers/admin/accounts_controller.rb'
- 'app/controllers/api/base_controller.rb'
- 'app/controllers/api/v1/admin/accounts_controller.rb'
- 'app/controllers/application_controller.rb'
- 'app/controllers/auth/registrations_controller.rb'
- 'app/controllers/auth/sessions_controller.rb'
- 'app/lib/activitypub/activity.rb'
- 'app/lib/activitypub/activity/create.rb'
- 'app/lib/activitypub/tag_manager.rb'
- 'app/lib/feed_manager.rb'
- 'app/lib/link_details_extractor.rb'
- 'app/lib/request.rb'
- 'app/lib/text_formatter.rb'
- 'app/lib/user_settings_decorator.rb'
- 'app/mailers/user_mailer.rb'
- 'app/models/account.rb'
- 'app/models/admin/account_action.rb'
- 'app/models/form/account_batch.rb'
- 'app/models/media_attachment.rb'
- 'app/models/status.rb'
- 'app/models/tag.rb'
- 'app/models/user.rb'
- 'app/serializers/activitypub/actor_serializer.rb'
- 'app/serializers/activitypub/note_serializer.rb'
- 'app/serializers/rest/status_serializer.rb'
- 'app/services/account_search_service.rb'
- 'app/services/activitypub/process_account_service.rb'
- 'app/services/activitypub/process_status_update_service.rb'
- 'app/services/backup_service.rb'
- 'app/services/delete_account_service.rb'
- 'app/services/fan_out_on_write_service.rb'
- 'app/services/fetch_link_card_service.rb'
- 'app/services/import_service.rb'
- 'app/services/notify_service.rb'
- 'app/services/post_status_service.rb'
- 'app/services/update_status_service.rb'
- 'lib/paperclip/color_extractor.rb'
# Reason: Currently disabled in .rubocop_todo.yml
# https://docs.rubocop.org/rubocop/cops_metrics.html#metricscyclomaticcomplexity
Metrics/CyclomaticComplexity:
Max: 12
Exclude:
- lib/mastodon/*cli*.rb
- db/*migrate/**/*
AllowedMethods:
- attempt_oembed
- blocked?
- build_crutches
- calculate_scores
- cc
- discover_endpoint!
- filter_from_home?
- hydrate
- klass
- link_to_mention
- log_target
- matches_time_window?
- patch_for_forwarding!
- preprocess_attributes!
- process_update
- remotable_attachment
- scan_text!
- self.cached_filters_for
- set_fetchable_attributes!
- setup_redis_env_url
- update_media_attachments!
Layout/LineLength:
Max: 140 # RuboCop default 120
AllowHeredoc: true
AllowURI: true
IgnoreCopDirectives: true
AllowedPatterns:
# Allow comments to be long lines
- !ruby/regexp / \# .*$/
- !ruby/regexp /^\# .*$/
Exclude:
- lib/**/*cli*.rb
- db/*migrate/**/*
- db/seeds/**/*
# Reason: Currently disabled in .rubocop_todo.yml
# https://docs.rubocop.org/rubocop/cops_metrics.html#metricsmethodlength
Metrics/MethodLength:
CountComments: false
CountAsOne: [array, heredoc]
Max: 25 # RuboCop default 10
Exclude:
- 'lib/mastodon/*_cli.rb'
AllowedMethods:
- account_link_to
- attempt_oembed
- body_with_limit
- build_crutches
- cached_filters_for
- calculate_scores
- check_webfinger!
- clean_feeds!
- collection_items
- collection_presenter
- copy_account_notes!
- deduplicate_accounts!
- deduplicate_conversations!
- deduplicate_local_accounts!
- deduplicate_statuses!
- deduplicate_tags!
- deduplicate_users!
- discover_endpoint!
- extract_extra_uris_with_indices
- extract_hashtags_with_indices
- extract_mentions_or_lists_with_indices
- filter_from_home?
- from_elasticsearch
- handle_explicit_update!
- handle_mark_as_sensitive!
- hsl_to_rgb
- import_bookmarks!
- import_domain_blocks!
- import_relationships!
- ldap_options
- matches_time_window?
- outbox_presenter
- pam_get_user
- parallelize_with_progress
- parse_and_transform
- patch_for_forwarding!
- populate_home
- post_process_style
- preload_cache_collection_target_statuses
- privatize_media_attachments!
- provides_callback_for
- publish_media_attachments!
- relevant_account_timestamp
- remotable_attachment
- rgb_to_hsl
- rss_status_content_format
- set_fetchable_attributes!
- setup_redis_env_url
- signed_request_actor
- to_preview_card_attributes
- upgrade_storage_filesystem
- upgrade_storage_s3
- user_settings_params
- hydrate
- cc
- self_destruct
# Reason:
# https://docs.rubocop.org/rubocop/cops_style.html#stylerescuestandarderror
Metrics/ModuleLength:
CountComments: false
Max: 200
CountAsOne: [array, heredoc]
Metrics/ParameterLists:
Max: 5 # RuboCop default 5
CountKeywordArgs: true # RuboCop default true
MaxOptionalParameters: 3 # RuboCop default 3
Exclude:
- app/models/concerns/account_interactions.rb
- app/services/activitypub/fetch_remote_account_service.rb
- app/services/activitypub/fetch_remote_actor_service.rb
Metrics/PerceivedComplexity:
Max: 16 # RuboCop default 8
AllowedMethods:
- attempt_oembed
- build_crutches
- calculate_scores
- deduplicate_users!
- discover_endpoint!
- filter_from_home?
- hydrate
- patch_for_forwarding!
- process_update
- remove_orphans
- update_media_attachments!
Naming/MemoizedInstanceVariableName:
Enabled: false
Naming/MethodParameterName:
Enabled: true
Rails:
Enabled: true
Rails/ApplicationController:
Enabled: false
Exclude:
- 'app/controllers/well_known/**/*.rb'
Rails/BelongsTo:
Enabled: false
Rails/ContentTag:
Enabled: false
Rails/EnumHash:
Enabled: false
# Reason: Prevailing style uses numeric status codes, matches RSpec/Rails/HttpStatus
# https://docs.rubocop.org/rubocop-rails/cops_rails.html#railshttpstatus
Rails/HttpStatus:
EnforcedStyle: numeric
# Reason: Allowed only in the `tootctl` CLI application code
# https://docs.rubocop.org/rubocop-rails/cops_rails.html#railsexit
Rails/Exit:
Exclude:
- 'lib/mastodon/*'
- 'lib/mastodon/*_cli.rb'
- 'lib/mastodon/cli_helper.rb'
- 'lib/cli.rb'
Rails/FilePath:
Enabled: false
Rails/HasAndBelongsToMany:
Enabled: false
Rails/HasManyOrHasOneDependent:
Enabled: false
Rails/HelperInstanceVariable:
Enabled: false
Rails/HttpStatus:
Enabled: false
Rails/IndexBy:
Enabled: false
Rails/InverseOf:
Enabled: false
Rails/LexicallyScopedActionFilter:
Enabled: false
Rails/OutputSafety:
Enabled: true
Rails/RakeEnvironment:
Enabled: false
Rails/RedundantForeignKey:
Enabled: false
Rails/SkipsModelValidations:
Enabled: false
Rails/UniqueValidationWithoutIndex:
Enabled: false
Style/AccessorGrouping:
Enabled: true
Style/AccessModifierDeclarations:
Enabled: false
Style/ArrayCoercion:
Enabled: true
# Reason: Some single letter camel case files shouldn't be split
# https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecfilepath
RSpec/FilePath:
CustomTransform:
ActivityPub: activitypub # Ignore the snake_case due to the amount of files to rename
DeepL: deepl
FetchOEmbedService: fetch_oembed_service
JsonLdHelper: jsonld_helper
OEmbedController: oembed_controller
OStatus: ostatus
NodeInfoController: nodeinfo_controller # NodeInfo isn't snake_cased for any of the instances
Exclude:
- 'spec/config/initializers/rack_attack_spec.rb' # namespaces usually have separate folder
- 'spec/lib/sanitize_config_spec.rb' # namespaces usually have separate folder
- 'spec/controllers/concerns/account_controller_concern_spec.rb' # Concerns describe ApplicationController and don't fit naming
- 'spec/controllers/concerns/export_controller_concern_spec.rb'
- 'spec/controllers/concerns/localized_spec.rb'
- 'spec/controllers/concerns/rate_limit_headers_spec.rb'
- 'spec/controllers/concerns/signature_verification_spec.rb'
- 'spec/controllers/concerns/user_tracking_concern_spec.rb'
# Reason:
# https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecnamedsubject
RSpec/NamedSubject:
EnforcedStyle: named_only
Style/BisectedAttrAccessor:
Enabled: true
# Reason: Prevailing style choice
# https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecnottonot
RSpec/NotToNot:
EnforcedStyle: to_not
Style/CaseLikeIf:
Enabled: false
# Reason: Prevailing style uses numeric status codes, matches Rails/HttpStatus
# https://docs.rubocop.org/rubocop-rspec/cops_rspec_rails.html#rspecrailshttpstatus
RSpec/Rails/HttpStatus:
EnforcedStyle: numeric
# Reason:
# https://docs.rubocop.org/rubocop/cops_style.html#styleclassandmodulechildren
Style/ClassAndModuleChildren:
Enabled: false
Style/CollectionMethods:
Enabled: true
PreferredMethods:
find_all: 'select'
# Reason: Classes mostly self-document with their names
# https://docs.rubocop.org/rubocop/cops_style.html#styledocumentation
Style/Documentation:
Enabled: false
Style/DoubleNegation:
Enabled: true
Style/ExpandPathArguments:
Enabled: false
Style/ExponentialNotation:
Enabled: true
Style/FormatString:
Enabled: false
Style/FormatStringToken:
Enabled: false
Style/FrozenStringLiteralComment:
Enabled: true
Style/GuardClause:
Enabled: false
Style/HashAsLastArrayItem:
Enabled: false
Style/HashEachMethods:
Enabled: true
Style/HashLikeCase:
Enabled: true
Style/HashTransformKeys:
Enabled: true
Style/HashTransformValues:
Enabled: false
# Reason: Enforce modern Ruby style
# https://docs.rubocop.org/rubocop/cops_style.html#stylehashsyntax
Style/HashSyntax:
Enabled: true
EnforcedStyle: ruby19_no_mixed_keys
Style/IfUnlessModifier:
Enabled: false
Style/InverseMethods:
Enabled: false
Style/Lambda:
Enabled: false
Style/MutableConstant:
Enabled: false
# Reason:
# https://docs.rubocop.org/rubocop/cops_style.html#stylenumericliterals
Style/NumericLiterals:
AllowedPatterns:
- \d{4}_\d{2}_\d{2}_\d{6} # For DB migration date version number readability
# Reason:
# https://docs.rubocop.org/rubocop/cops_style.html#stylepercentliteraldelimiters
Style/PercentLiteralDelimiters:
PreferredDelimiters:
'%i': '()'
'%w': '()'
Style/PerlBackrefs:
AutoCorrect: false
Style/RedundantFetchBlock:
Enabled: true
Style/RedundantFileExtensionInRequire:
Enabled: true
Style/RedundantRegexpCharacterClass:
Enabled: false
Style/RedundantRegexpEscape:
Enabled: false
Style/RedundantReturn:
Enabled: true
# Reason: Prefer less indentation in conditional assignments
# https://docs.rubocop.org/rubocop/cops_style.html#styleredundantbegin
Style/RedundantBegin:
Enabled: false
Style/RegexpLiteral:
Enabled: false
# Reason: Overridden to reduce implicit StandardError rescues
# https://docs.rubocop.org/rubocop/cops_style.html#stylerescuestandarderror
Style/RescueStandardError:
Enabled: true
Style/SignalException:
Enabled: false
Style/SlicingWithRange:
Enabled: true
EnforcedStyle: implicit
# Reason: Originally disabled for CodeClimate, and no config consensus has been found
# https://docs.rubocop.org/rubocop/cops_style.html#stylesymbolarray
Style/SymbolArray:
Enabled: false
# Reason:
# https://docs.rubocop.org/rubocop/cops_style.html#styletrailingcommainarrayliteral
Style/TrailingCommaInArrayLiteral:
EnforcedStyleForMultiline: 'comma'
# Reason:
# https://docs.rubocop.org/rubocop/cops_style.html#styletrailingcommainhashliteral
Style/TrailingCommaInHashLiteral:
EnforcedStyleForMultiline: 'comma'
Style/UnpackFirst:
Enabled: false
RSpec/ScatteredSetup:
Enabled: false
RSpec/ImplicitExpect:
Enabled: false
RSpec/NamedSubject:
Enabled: false
RSpec/DescribeClass:
Enabled: false
RSpec/LetSetup:
Enabled: false

File diff suppressed because it is too large Load Diff

@ -1 +1 @@
3.0.4
3.2.2

@ -44,3 +44,6 @@ Gruntfile.js
# for specific ignore
!.svgo.yml
!sass-lint/**/*.yml
# breaks lint-staged or generally anything using https://github.com/eemeli/yaml/issues/384
!**/yaml/dist/**/doc

@ -1,8 +1,72 @@
Changelog
=========
# Changelog
All notable changes to this project will be documented in this file.
## [4.1.2] - 2023-04-04
### Fixed
- Fix crash in `tootctl` commands making use of parallelization when Elasticsearch is enabled ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/24182), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/24377))
- Fix crash in `db:setup` when Elasticsearch is enabled ([rrgeorge](https://github.com/mastodon/mastodon/pull/24302))
- Fix user archive takeout when using OpenStack Swift or S3 providers with no ACL support ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/24200))
- Fix invalid/expired invites being processed on sign-up ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/24337))
### Security
- Update Ruby to 3.0.6 due to ReDoS vulnerabilities ([saizai](https://github.com/mastodon/mastodon/pull/24334))
- Fix unescaped user input in LDAP query ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/24379))
## [4.1.1] - 2023-03-16
### Added
- Add redirection from paths with url-encoded `@` to their decoded form ([thijskh](https://github.com/mastodon/mastodon/pull/23593))
- Add `lang` attribute to native language names in language picker in Web UI ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23749))
- Add headers to outgoing mails to avoid auto-replies ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23597))
- Add support for refreshing many accounts at once with `tootctl accounts refresh` ([9p4](https://github.com/mastodon/mastodon/pull/23304))
- Add confirmation modal when clicking to edit a post with a non-empty compose form ([PauloVilarinho](https://github.com/mastodon/mastodon/pull/23936))
- Add support for the HAproxy PROXY protocol through the `PROXY_PROTO_V1` environment variable ([CSDUMMI](https://github.com/mastodon/mastodon/pull/24064))
- Add `SENDFILE_HEADER` environment variable ([Gargron](https://github.com/mastodon/mastodon/pull/24123))
- Add cache headers to static files served through Rails ([Gargron](https://github.com/mastodon/mastodon/pull/24120))
### Changed
- Increase contrast of upload progress bar background ([toolmantim](https://github.com/mastodon/mastodon/pull/23836))
- Change post auto-deletion throttling constants to better scale with server size ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23320))
- Change order of bookmark and favourite sidebar entries in single-column UI for consistency ([TerryGarcia](https://github.com/mastodon/mastodon/pull/23701))
- Change `ActivityPub::DeliveryWorker` retries to be spread out more ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/21956))
### Fixed
- Fix “Remove all followers from the selected domains” also removing follows and notifications ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23805))
- Fix streaming metrics format ([emilweth](https://github.com/mastodon/mastodon/pull/23519), [emilweth](https://github.com/mastodon/mastodon/pull/23520))
- Fix case-sensitive check for previously used hashtags in hashtag autocompletion ([deanveloper](https://github.com/mastodon/mastodon/pull/23526))
- Fix focus point of already-attached media not saving after edit ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23566))
- Fix sidebar behavior in settings/admin UI on mobile ([wxt2005](https://github.com/mastodon/mastodon/pull/23764))
- Fix inefficiency when searching accounts per username in admin interface ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23801))
- Fix duplicate “Publish” button on mobile ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23804))
- Fix server error when failing to follow back followers from `/relationships` ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23787))
- Fix server error when attempting to display the edit history of a trendable post in the admin interface ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23574))
- Fix `tootctl accounts migrate` crashing because of a typo ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23567))
- Fix original account being unfollowed on migration before the follow request to the new account could be sent ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/21957))
- Fix the “Back” button in column headers sometimes leaving Mastodon ([c960657](https://github.com/mastodon/mastodon/pull/23953))
- Fix pgBouncer resetting application name on every transaction ([Gargron](https://github.com/mastodon/mastodon/pull/23958))
- Fix unconfirmed accounts being counted as active users ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23803))
- Fix `/api/v1/streaming` sub-paths not being redirected ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23988))
- Fix drag'n'drop upload area text that spans multiple lines not being centered ([vintprox](https://github.com/mastodon/mastodon/pull/24029))
- Fix sidekiq jobs not triggering Elasticsearch index updates ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/24046))
- Fix tags being unnecessarily stripped from plain-text short site description ([c960657](https://github.com/mastodon/mastodon/pull/23975))
- Fix HTML entities not being un-escaped in extracted plain-text from remote posts ([c960657](https://github.com/mastodon/mastodon/pull/24019))
- Fix dashboard crash on ElasticSearch server error ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23751))
- Fix incorrect post links in strikes when the account is remote ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23611))
- Fix misleading error code when receiving invalid WebAuthn credentials ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23568))
- Fix duplicate mails being sent when the SMTP server is too slow to close the connection ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23750))
### Security
- Change user backups to use expiring URLs for download when possible ([Gargron](https://github.com/mastodon/mastodon/pull/24136))
- Add warning for object storage misconfiguration ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/24137))
## [4.1.0] - 2023-02-10
### Added
@ -219,6 +283,7 @@ All notable changes to this project will be documented in this file.
- Fix unbounded recursion in post discovery ([ClearlyClaire,nametoolong](https://github.com/mastodon/mastodon/pull/23506))
## [4.0.2] - 2022-11-15
### Fixed
- Fix wrong color on mentions hidden behind content warning in web UI ([Gargron](https://github.com/mastodon/mastodon/pull/20724))
@ -226,6 +291,7 @@ All notable changes to this project will be documented in this file.
- Fix `unsafe-eval` being used when `wasm-unsafe-eval` is enough in Content Security Policy ([Gargron](https://github.com/mastodon/mastodon/pull/20729), [prplecake](https://github.com/mastodon/mastodon/pull/20606))
## [4.0.1] - 2022-11-14
### Fixed
- Fix nodes order being sometimes mangled when rewriting emoji ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/20677))
@ -429,6 +495,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
- Fix out-of-bound reads in blurhash transcoder ([delroth](https://github.com/mastodon/mastodon/pull/20388))
## [3.5.3] - 2022-05-26
### Added
- **Add language dropdown to compose form in web UI** ([Gargron](https://github.com/mastodon/mastodon/pull/18420), [ykzts](https://github.com/mastodon/mastodon/pull/18460))
@ -476,6 +543,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
- Fix confirmation redirect to app without `Location` header ([Gargron](https://github.com/mastodon/mastodon/pull/18523))
## [3.5.2] - 2022-05-04
### Added
- Add warning on direct messages screen in web UI ([Gargron](https://github.com/mastodon/mastodon/pull/18289))
@ -528,6 +596,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
- Fix error in alias settings page ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/18004))
## [3.5.1] - 2022-04-08
### Added
- Add pagination for trending statuses in web UI ([Gargron](https://github.com/mastodon/mastodon/pull/17976))
@ -571,6 +640,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
- Fix error when indexing statuses into Elasticsearch ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/17912))
## [3.5.0] - 2022-03-30
### Added
- **Add support for incoming edited posts** ([Gargron](https://github.com/mastodon/mastodon/pull/16697), [Gargron](https://github.com/mastodon/mastodon/pull/17727), [Gargron](https://github.com/mastodon/mastodon/pull/17728), [Gargron](https://github.com/mastodon/mastodon/pull/17320), [Gargron](https://github.com/mastodon/mastodon/pull/17404), [Gargron](https://github.com/mastodon/mastodon/pull/17390), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/17335), [Gargron](https://github.com/mastodon/mastodon/pull/17696), [Gargron](https://github.com/mastodon/mastodon/pull/17745), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/17740), [Gargron](https://github.com/mastodon/mastodon/pull/17697), [Gargron](https://github.com/mastodon/mastodon/pull/17648), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/17531), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/17499), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/17498), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/17380), [Gargron](https://github.com/mastodon/mastodon/pull/17373), [Gargron](https://github.com/mastodon/mastodon/pull/17334), [Gargron](https://github.com/mastodon/mastodon/pull/17333), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/17699), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/17748))
@ -770,6 +840,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
- Fix being able to bypass e-mail restrictions ([Gargron](https://github.com/mastodon/mastodon/pull/17909))
## [3.4.6] - 2022-02-03
### Fixed
- Fix `mastodon:webpush:generate_vapid_key` task requiring a functional environment ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/17338))
@ -784,6 +855,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
- Disable legacy XSS filtering ([Wonderfall](https://github.com/mastodon/mastodon/pull/17289))
## [3.4.5] - 2022-01-31
### Added
- Add more advanced migration tests ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/17393))
@ -798,6 +870,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
- Fix followers synchronization mechanism ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/16510))
## [3.4.4] - 2021-11-26
### Fixed
- Fix error when suspending user with an already blocked canonical email ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/17036))
@ -815,11 +888,13 @@ Some of the features in this release have been funded through the [NGI0 Discover
- Fix handling of recursive toots in WebUI ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/17041))
## [3.4.3] - 2021-11-06
### Fixed
- Fix login being broken due to inaccurately applied backport fix in 3.4.2 ([Gargron](https://github.com/mastodon/mastodon/commit/5c47a18c8df3231aa25c6d1f140a71a7fac9cbf9))
## [3.4.2] - 2021-11-06
### Added
- Add `configuration` attribute to `GET /api/v1/instance` ([Gargron](https://github.com/mastodon/mastodon/pull/16485))
@ -863,6 +938,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
- Fix revoking a specific session not working ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/16943))
## [3.4.1] - 2021-06-03
### Added
- Add new emoji assets from Twemoji 13.1.0 ([Gargron](https://github.com/mastodon/mastodon/pull/16345))
@ -882,6 +958,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
- Fix mailer jobs for deleted notifications erroring out ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/16294))
## [3.4.0] - 2021-05-16
### Added
- **Add follow recommendations for onboarding** ([Gargron](https://github.com/mastodon/mastodon/pull/15945), [Gargron](https://github.com/mastodon/mastodon/pull/16161), [Gargron](https://github.com/mastodon/mastodon/pull/16060), [Gargron](https://github.com/mastodon/mastodon/pull/16077), [Gargron](https://github.com/mastodon/mastodon/pull/16078), [Gargron](https://github.com/mastodon/mastodon/pull/16160), [Gargron](https://github.com/mastodon/mastodon/pull/16079), [noellabo](https://github.com/mastodon/mastodon/pull/16044), [noellabo](https://github.com/mastodon/mastodon/pull/16045), [Gargron](https://github.com/mastodon/mastodon/pull/16152), [Gargron](https://github.com/mastodon/mastodon/pull/16153), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/16082), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/16173), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/16159), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/16189))
@ -917,7 +994,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
- This method allows an app through which a user signed-up to request a new confirmation e-mail to be sent, or to change the e-mail of the account before it is confirmed
- Add `GET /api/v1/accounts/lookup` to REST API ([Gargron](https://github.com/mastodon/mastodon/pull/15740), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/15750))
- This method allows to quickly convert a username of a known account to an ID that can be used with the REST API, or to check if a username is available
for sign-up
for sign-up
- Add `policy` param to `POST /api/v1/push/subscriptions` in REST API ([Gargron](https://github.com/mastodon/mastodon/pull/16040))
- This param allows an app to control from whom notifications should be delivered as push notifications to the app
- Add `details` to error response for `POST /api/v1/accounts` in REST API ([Gargron](https://github.com/mastodon/mastodon/pull/15803))
@ -1027,6 +1104,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
- Fix app name, website and redirect URIs not having a maximum length ([Gargron](https://github.com/mastodon/mastodon/pull/16042))
## [3.3.0] - 2020-12-27
### Added
- **Add hotkeys for audio/video control in web UI** ([Gargron](https://github.com/mastodon/mastodon/pull/15158), [Gargron](https://github.com/mastodon/mastodon/pull/15198))
@ -1203,6 +1281,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
- Fix resolving accounts sometimes creating duplicate records for a given ActivityPub identifier ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/15364))
## [3.2.2] - 2020-12-19
### Added
- Add `tootctl maintenance fix-duplicates` ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/14860), [Gargron](https://github.com/mastodon/mastodon/pull/15223))
@ -1229,6 +1308,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
- Fix resolving accounts sometimes creating duplicate records for a given ActivityPub identifier ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/15364))
## [3.2.1] - 2020-10-19
### Added
- Add support for latest HTTP Signatures spec draft ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/14556))
@ -1258,6 +1338,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
- Fix files served as `application/octet-stream` being rejected without attempting mime type detection ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/14452))
## [3.2.0] - 2020-07-27
### Added
- Add `SMTP_SSL` environment variable ([OmmyZhang](https://github.com/mastodon/mastodon/pull/14309))
@ -1393,7 +1474,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
- Fix unique username constraint for local users not being enforced in database ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/14099))
- Fix unnecessary gap under video modal in web UI ([mfmfuyu](https://github.com/mastodon/mastodon/pull/14098))
- Fix 2FA and sign in token pages not respecting user locale ([mfmfuyu](https://github.com/mastodon/mastodon/pull/14087))
- Fix unapproved users being able to view profiles when in limited-federation mode *and* requiring approval for sign-ups ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/14093))
- Fix unapproved users being able to view profiles when in limited-federation mode _and_ requiring approval for sign-ups ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/14093))
- Fix initial audio volume not corresponding to what's displayed in audio player in web UI ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/14057))
- Fix timelines sometimes jumping when closing modals in web UI ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/14019))
- Fix memory usage of downloading remote files ([Gargron](https://github.com/mastodon/mastodon/pull/14184), [Gargron](https://github.com/mastodon/mastodon/pull/14181), [noellabo](https://github.com/mastodon/mastodon/pull/14356))
@ -1411,6 +1492,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
- Clear out media attachments in a separate worker (slow)
## [3.1.5] - 2020-07-07
### Security
- Fix media attachment enumeration ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/14254))
@ -1418,6 +1500,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
- Fix other sessions not being logged out on password change ([Gargron](https://github.com/mastodon/mastodon/pull/14252))
## [3.1.4] - 2020-05-14
### Added
- Add `vi` to available locales ([taicv](https://github.com/mastodon/mastodon/pull/13542))
@ -1456,7 +1539,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
- Fix regression in `tootctl media remove-orphans` ([Gargron](https://github.com/mastodon/mastodon/pull/13405))
- Fix old unique jobs digests not having been cleaned up ([Gargron](https://github.com/mastodon/mastodon/pull/13683))
- Fix own following/followers not showing muted users ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/13614))
- Fix list of followed people ignoring sorting on Follows & Followers page ([taras2358](https://github.com/mastodon/mastodon/pull/13676))
- Fix list of followed people ignoring sorting on Follows & Followers page ([taras2358](https://github.com/mastodon/mastodon/pull/13676))
- Fix wrong pgHero Content-Security-Policy when `CDN_HOST` is set ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/13595))
- Fix needlessly deduplicating usernames on collisions with remote accounts when signing-up through SAML/CAS ([kaiyou](https://github.com/mastodon/mastodon/pull/13581))
- Fix page incorrectly scrolling when bringing up dropdown menus in web UI ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/13574))
@ -1485,6 +1568,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
- The issue only affects developers of apps who are shared between multiple users, such as server-side apps like cross-posters
## [3.1.3] - 2020-04-05
### Added
- Add ability to filter audit log in admin UI ([Gargron](https://github.com/mastodon/mastodon/pull/13381))
@ -1558,6 +1642,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
- Fix re-sending of e-mail confirmation not being rate limited ([Gargron](https://github.com/mastodon/mastodon/pull/13360))
## [v3.1.2] - 2020-02-27
### Added
- Add `--reset-password` option to `tootctl accounts modify` ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/13126))
@ -1584,11 +1669,13 @@ Some of the features in this release have been funded through the [NGI0 Discover
- Fix leak of arbitrary statuses through unfavourite action in REST API ([Gargron](https://github.com/mastodon/mastodon/pull/13161))
## [3.1.1] - 2020-02-10
### Fixed
- Fix yanked dependency preventing installation ([mayaeh](https://github.com/mastodon/mastodon/pull/13059))
## [3.1.0] - 2020-02-09
### Added
- Add bookmarks ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/7107), [Gargron](https://github.com/mastodon/mastodon/pull/12494), [Gomasy](https://github.com/mastodon/mastodon/pull/12381))
@ -1753,6 +1840,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
- Fix settings pages being cacheable by the browser ([Gargron](https://github.com/mastodon/mastodon/pull/12714))
## [3.0.1] - 2019-10-10
### Added
- Add `tootctl media usage` command ([Gargron](https://github.com/mastodon/mastodon/pull/12115))
@ -1786,6 +1874,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
- Fix `tootctl accounts cull` advertising unused option flag ([Kjwon15](https://github.com/mastodon/mastodon/pull/12074))
## [3.0.0] - 2019-10-03
### Added
- Add "not available" label to unloaded media attachments in web UI ([Gargron](https://github.com/mastodon/mastodon/pull/11715), [Gargron](https://github.com/mastodon/mastodon/pull/11745))
@ -1982,6 +2071,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
- Fix performance of GIF re-encoding and always strip EXIF data from videos ([Gargron](https://github.com/mastodon/mastodon/pull/12057))
## [2.9.3] - 2019-08-10
### Added
- Add GIF and WebP support for custom emojis ([Gargron](https://github.com/mastodon/mastodon/pull/11519))
@ -2041,6 +2131,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
- Fix blocked domains still being able to fill database with account records ([Gargron](https://github.com/mastodon/mastodon/pull/11219))
## [2.9.2] - 2019-06-22
### Added
- Add `short_description` and `approval_required` to `GET /api/v1/instance` ([Gargron](https://github.com/mastodon/mastodon/pull/11146))
@ -2055,6 +2146,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
- Fix audio not being downloaded from remote servers ([Gargron](https://github.com/mastodon/mastodon/pull/11145))
## [2.9.1] - 2019-06-22
### Added
- Add moderation API ([Gargron](https://github.com/mastodon/mastodon/pull/9387))
@ -2080,6 +2172,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
- Fix scrolling behaviour in compose form ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/11093))
## [2.9.0] - 2019-06-13
### Added
- **Add single-column mode in web UI** ([Gargron](https://github.com/mastodon/mastodon/pull/10807), [Gargron](https://github.com/mastodon/mastodon/pull/10848), [Gargron](https://github.com/mastodon/mastodon/pull/11003), [Gargron](https://github.com/mastodon/mastodon/pull/10961), [Hanage999](https://github.com/mastodon/mastodon/pull/10915), [noellabo](https://github.com/mastodon/mastodon/pull/10917), [abcang](https://github.com/mastodon/mastodon/pull/10859), [Gargron](https://github.com/mastodon/mastodon/pull/10820), [Gargron](https://github.com/mastodon/mastodon/pull/10835), [Gargron](https://github.com/mastodon/mastodon/pull/10809), [Gargron](https://github.com/mastodon/mastodon/pull/10963), [noellabo](https://github.com/mastodon/mastodon/pull/10883), [Hanage999](https://github.com/mastodon/mastodon/pull/10839))
@ -2134,6 +2227,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
- Fix login sometimes redirecting to paths that are not pages ([Gargron](https://github.com/mastodon/mastodon/pull/11019))
## [2.8.4] - 2019-05-24
### Fixed
- Fix delivery not retrying on some inbox errors that should be retriable ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/10812))
@ -2145,6 +2239,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
- Require specific OAuth scopes for specific endpoints of the streaming API, instead of merely requiring a token for all endpoints, and allow using WebSockets protocol negotiation to specify the access token instead of using a query string ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/10818))
## [2.8.3] - 2019-05-19
### Added
- Add `og:image:alt` OpenGraph tag ([BenLubar](https://github.com/mastodon/mastodon/pull/10779))
@ -2167,6 +2262,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
- Fix "invited by" not showing up in admin UI ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/10791))
## [2.8.2] - 2019-05-05
### Added
- Add `SOURCE_TAG` environment variable ([ushitora-anqou](https://github.com/mastodon/mastodon/pull/10698))
@ -2179,6 +2275,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
- Fix closing video modal scrolling timelines to top ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/10695))
## [2.8.1] - 2019-05-04
### Added
- Add link to existing domain block when trying to block an already-blocked domain ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/10663))
@ -2218,6 +2315,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
- Fix confirmation modals being too narrow for a secondary action button ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/10586))
## [2.8.0] - 2019-04-10
### Added
- Add polls ([Gargron](https://github.com/mastodon/mastodon/pull/10111), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/10155), [Gargron](https://github.com/mastodon/mastodon/pull/10184), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/10196), [Gargron](https://github.com/mastodon/mastodon/pull/10248), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/10255), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/10322), [Gargron](https://github.com/mastodon/mastodon/pull/10138), [Gargron](https://github.com/mastodon/mastodon/pull/10139), [Gargron](https://github.com/mastodon/mastodon/pull/10144), [Gargron](https://github.com/mastodon/mastodon/pull/10145),[Gargron](https://github.com/mastodon/mastodon/pull/10146), [Gargron](https://github.com/mastodon/mastodon/pull/10148), [Gargron](https://github.com/mastodon/mastodon/pull/10151), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/10150), [Gargron](https://github.com/mastodon/mastodon/pull/10168), [Gargron](https://github.com/mastodon/mastodon/pull/10165), [Gargron](https://github.com/mastodon/mastodon/pull/10172), [Gargron](https://github.com/mastodon/mastodon/pull/10170), [Gargron](https://github.com/mastodon/mastodon/pull/10171), [Gargron](https://github.com/mastodon/mastodon/pull/10186), [Gargron](https://github.com/mastodon/mastodon/pull/10189), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/10200), [rinsuki](https://github.com/mastodon/mastodon/pull/10203), [Gargron](https://github.com/mastodon/mastodon/pull/10213), [Gargron](https://github.com/mastodon/mastodon/pull/10246), [Gargron](https://github.com/mastodon/mastodon/pull/10265), [Gargron](https://github.com/mastodon/mastodon/pull/10261), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/10333), [Gargron](https://github.com/mastodon/mastodon/pull/10352), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/10140), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/10142), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/10141), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/10162), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/10161), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/10158), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/10156), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/10160), [Gargron](https://github.com/mastodon/mastodon/pull/10185), [Gargron](https://github.com/mastodon/mastodon/pull/10188), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/10195), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/10208), [Gargron](https://github.com/mastodon/mastodon/pull/10187), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/10214), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/10209))
@ -2301,6 +2399,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
- Fix `tootctl accounts cull` sometimes removing accounts that are temporarily unreachable ([BenLubar](https://github.com/mastodon/mastodon/pull/10460))
## [2.7.4] - 2019-03-05
### Fixed
- Fix web UI not cleaning up notifications after block ([Gargron](https://github.com/mastodon/mastodon/pull/10108))
@ -2315,6 +2414,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
- Fix edit profile page crash for suspended-then-unsuspended users ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/10178))
## [2.7.3] - 2019-02-23
### Added
- Add domain filter to the admin federation page ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/10071))
@ -2332,6 +2432,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
- Change custom emojis to randomize stored file name ([hinaloe](https://github.com/mastodon/mastodon/pull/10090))
## [2.7.2] - 2019-02-17
### Added
- Add support for IPv6 in e-mail validation ([zoc](https://github.com/mastodon/mastodon/pull/10009))
@ -2373,6 +2474,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
- Change error graphic to hover-to-play ([Gargron](https://github.com/mastodon/mastodon/pull/10055))
## [2.7.1] - 2019-01-28
### Fixed
- Fix SSO authentication not working due to missing agreement boolean ([Gargron](https://github.com/mastodon/mastodon/pull/9915))
@ -2387,6 +2489,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
- Fix missing strong style for landing page description ([Kjwon15](https://github.com/mastodon/mastodon/pull/9892))
## [2.7.0] - 2019-01-20
### Added
- Add link for adding a user to a list from their profile ([namelessGonbai](https://github.com/mastodon/mastodon/pull/9062))
@ -2516,6 +2619,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
- Add tombstones for remote statuses to prevent replay attacks ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/9830))
## [2.6.5] - 2018-12-01
### Changed
- Change lists to display replies to others on the list and list owner ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/9324))
@ -2525,11 +2629,13 @@ Some of the features in this release have been funded through the [NGI0 Discover
- Fix failures caused by commonly-used JSON-LD contexts being unavailable ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/9412))
## [2.6.4] - 2018-11-30
### Fixed
- Fix yarn dependencies not installing due to yanked event-stream package ([Gargron](https://github.com/mastodon/mastodon/pull/9401))
## [2.6.3] - 2018-11-30
### Added
- Add hyphen to characters allowed in remote usernames ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/9345))
@ -2549,6 +2655,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
- Fix TLS handshake timeout not being enforced ([Gargron](https://github.com/mastodon/mastodon/pull/9381))
## [2.6.2] - 2018-11-23
### Added
- Add Page to whitelisted ActivityPub types ([mbajur](https://github.com/mastodon/mastodon/pull/9188))
@ -2583,12 +2690,14 @@ Some of the features in this release have been funded through the [NGI0 Discover
- Fix HTTP connection timeout of 10s not being enforced ([Gargron](https://github.com/mastodon/mastodon/pull/9329))
## [2.6.1] - 2018-10-30
### Fixed
- Fix resolving resources by URL not working due to a regression in [valerauko](https://github.com/mastodon/mastodon/pull/9132) ([Gargron](https://github.com/mastodon/mastodon/pull/9171))
- Fix reducer error in web UI when a conversation has no last status ([Gargron](https://github.com/mastodon/mastodon/pull/9173))
## [2.6.0] - 2018-10-30
### Added
- Add link ownership verification ([Gargron](https://github.com/mastodon/mastodon/pull/8703))
@ -2693,11 +2802,13 @@ Some of the features in this release have been funded through the [NGI0 Discover
- Fix handling of content types with profile ([valerauko](https://github.com/mastodon/mastodon/pull/9132))
## [2.5.2] - 2018-10-12
### Security
- Fix XSS vulnerability ([Gargron](https://github.com/mastodon/mastodon/pull/8959))
## [2.5.1] - 2018-10-07
### Fixed
- Fix database migrations for PostgreSQL below 9.5 ([Gargron](https://github.com/mastodon/mastodon/pull/8903))

@ -8,19 +8,19 @@ In the interest of fostering an open and welcoming environment, we as contributo
Examples of behavior that contributes to creating a positive environment include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting
- The use of sexualized language or imagery and unwelcome sexual attention or advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a professional setting
## Our Responsibilities

@ -1,10 +1,10 @@
# Contributing to Mastodon Glitch Edition #
# Contributing to Mastodon Glitch Edition
Thank you for your interest in contributing to the `glitch-soc` project!
Here are some guidelines, and ways you can help.
> (This document is a bit of a work-in-progress, so please bear with us.
> If you don't see what you're looking for here, please don't hesitate to reach out!)
> (This document is a bit of a work-in-progress, so please bear with us.
> If you don't see what you're looking for here, please don't hesitate to reach out!)
## Translations
@ -12,34 +12,32 @@ You can submit glitch-soc-specific translations via [Crowdin](https://crowdin.co
[![Crowdin](https://badges.crowdin.net/glitch-soc/localized.svg)](https://crowdin.com/project/glitch-soc)
## Planning ##
## Planning
Right now a lot of the planning for this project takes place in our development Discord, or through GitHub Issues and Projects.
We're working on ways to improve the planning structure and better solicit feedback, and if you feel like you can help in this respect, feel free to give us a holler.
## Documentation ##
## Documentation
The documentation for this repository is available at [`glitch-soc/docs`](https://github.com/glitch-soc/docs) (online at [glitch-soc.github.io/docs/](https://glitch-soc.github.io/docs/)).
Right now, we've mostly focused on the features that make this fork different from upstream in some manner.
Adding screenshots, improving descriptions, and so forth are all ways to help contribute to the project even if you don't know any code.
## Frontend Development ##
## Frontend Development
Check out [the documentation here](https://glitch-soc.github.io/docs/contributing/frontend/) for more information.
## Backend Development ##
## Backend Development
See the guidelines below.
- - -
---
You should also try to follow the guidelines set out in the original `CONTRIBUTING.md` from `mastodon/mastodon`, reproduced below.
<blockquote>
CONTRIBUTING
=======
Contributing
# Contributing
Thank you for considering contributing to Mastodon 🐘
@ -68,9 +66,9 @@ You can submit translations via [Crowdin](https://crowdin.com/project/mastodon).
Example:
|Not ideal|Better|
|---|----|
|Fixed NoMethodError in RemovalWorker|Fix nil error when removing statuses caused by race condition|
| Not ideal | Better |
| ------------------------------------ | ------------------------------------------------------------- |
| Fixed NoMethodError in RemovalWorker | Fix nil error when removing statuses caused by race condition |
It is not always possible to phrase every change in such a manner, but it is desired.
@ -82,8 +80,6 @@ It is not always possible to phrase every change in such a manner, but it is des
- Code style rules (rubocop, eslint)
- Normalization of locale files (i18n-tasks)
**Note**: You may need to log in and authorise the GitHub account your fork of this repository belongs to with CircleCI to enable some of the automated checks to run.
## Documentation
The [Mastodon documentation](https://docs.joinmastodon.org) is a statically generated site. You can [submit merge requests to mastodon/documentation](https://github.com/mastodon/documentation).

@ -1,4 +1,5 @@
# frozen_string_literal: true
require 'capistrano/setup'
require 'capistrano/deploy'
require 'capistrano/scm/git'

@ -1,8 +1,8 @@
# syntax=docker/dockerfile:1.4
# This needs to be bullseye-slim because the Ruby image is built on bullseye-slim
ARG NODE_VERSION="16.18.1-bullseye-slim"
ARG NODE_VERSION="16.20-bullseye-slim"
FROM ghcr.io/moritzheiber/ruby-jemalloc:3.0.4-slim as ruby
FROM ghcr.io/moritzheiber/ruby-jemalloc:3.2.2-slim as ruby
FROM node:${NODE_VERSION} as build
COPY --link --from=ruby /opt/ruby /opt/ruby
@ -18,7 +18,6 @@ COPY Gemfile* package.json yarn.lock /opt/mastodon/
# hadolint ignore=DL3008
RUN apt-get update && \
apt-get install -y --no-install-recommends build-essential \
ca-certificates \
git \
libicu-dev \
libidn11-dev \
@ -37,7 +36,8 @@ RUN apt-get update && \
bundle config set --local without 'development test' && \
bundle config set silence_root_warning true && \
bundle install -j"$(nproc)" && \
yarn install --pure-lockfile --network-timeout 600000
yarn install --pure-lockfile --production --network-timeout 600000 && \
yarn cache clean
FROM node:${NODE_VERSION}
@ -91,8 +91,7 @@ USER mastodon
WORKDIR /opt/mastodon
# Precompile assets
RUN OTP_SECRET=precompile_placeholder SECRET_KEY_BASE=precompile_placeholder rails assets:precompile && \
yarn cache clean
RUN OTP_SECRET=precompile_placeholder SECRET_KEY_BASE=precompile_placeholder rails assets:precompile
# Set the work dir and the container entry point
ENTRYPOINT ["/usr/bin/tini", "--"]

@ -1,27 +1,26 @@
# frozen_string_literal: true
source 'https://rubygems.org'
ruby '>= 2.7.0', '< 3.1.0'
ruby '>= 2.7.0', '< 3.3.0'
gem 'pkg-config', '~> 1.5'
gem 'rexml', '~> 3.2'
gem 'puma', '~> 5.6'
gem 'puma', '~> 6.2'
gem 'rails', '~> 6.1.7'
gem 'sprockets', '~> 3.7.2'
gem 'thor', '~> 1.2'
gem 'rack', '~> 2.2.6'
gem 'hamlit-rails', '~> 0.2'
gem 'haml-rails', '~>2.0'
gem 'pg', '~> 1.4'
gem 'makara', '~> 0.5'
gem 'pghero'
gem 'dotenv-rails', '~> 2.8'
gem 'aws-sdk-s3', '~> 1.119', require: false
gem 'aws-sdk-s3', '~> 1.120', require: false
gem 'fog-core', '<= 2.4.0'
gem 'fog-openstack', '~> 0.3', require: false
gem 'kt-paperclip', '~> 7.1'
gem 'kt-paperclip', '~> 7.1', github: 'kreeti/kt-paperclip', ref: '11abf222dc31bff71160a1d138b445214f434b2b'
gem 'blurhash', '~> 0.1'
gem 'active_model_serializers', '~> 0.10'
@ -30,7 +29,7 @@ gem 'bootsnap', '~> 1.16.0', require: false
gem 'browser'
gem 'charlock_holmes', '~> 0.7.7'
gem 'chewy', '~> 7.2'
gem 'devise', '~> 4.8'
gem 'devise', '~> 4.9'
gem 'devise-two-factor', '~> 4.0'
group :pam_authentication, optional: true do
@ -40,7 +39,7 @@ end
gem 'net-ldap', '~> 0.17'
gem 'omniauth-cas', '~> 2.0'
gem 'omniauth-saml', '~> 1.10'
gem 'gitlab-omniauth-openid-connect', '~>0.10.1', require: 'omniauth_openid_connect'
gem 'omniauth_openid_connect', '~> 0.6.1'
gem 'omniauth', '~> 1.9'
gem 'omniauth-rails_csrf_protection', '~> 0.1'
@ -62,7 +61,7 @@ gem 'link_header', '~> 0.0'
gem 'mime-types', '~> 3.4.1', require: 'mime/types/columnar'
gem 'nokogiri', '~> 1.14'
gem 'nsa', '~> 0.2'
gem 'oj', '~> 3.13'
gem 'oj', '~> 3.14'
gem 'ox', '~> 2.14'
gem 'parslet'
gem 'posix-spawn'
@ -70,9 +69,9 @@ gem 'public_suffix', '~> 5.0'
gem 'pundit', '~> 2.3'
gem 'premailer-rails'
gem 'rack-attack', '~> 6.6'
gem 'rack-cors', '~> 1.1', require: 'rack/cors'
gem 'rack-cors', '~> 2.0', require: 'rack/cors'
gem 'rails-i18n', '~> 6.0'
gem 'rails-settings-cached', '~> 0.6'
gem 'rails-settings-cached', '~> 0.6', git: 'https://github.com/mastodon/rails-settings-cached.git', branch: 'v0.6.6-aliases-true'
gem 'redcarpet', '~> 3.6'
gem 'redis', '~> 4.5', require: ['redis', 'redis/connection/hiredis']
gem 'mario-redis-lock', '~> 1.2', require: 'redis_lock'
@ -81,20 +80,20 @@ gem 'ruby-progressbar', '~> 1.11'
gem 'sanitize', '~> 6.0'
gem 'scenic', '~> 1.7'
gem 'sidekiq', '~> 6.5'
gem 'sidekiq-scheduler', '~> 4.0'
gem 'sidekiq-scheduler', '~> 5.0'
gem 'sidekiq-unique-jobs', '~> 7.1'
gem 'sidekiq-bulk', '~> 0.2.0'
gem 'simple-navigation', '~> 4.4'
gem 'simple_form', '~> 5.2'
gem 'sprockets-rails', '~> 3.4', require: 'sprockets/railtie'
gem 'stoplight', '~> 3.0.1'
gem 'strong_migrations', '~> 0.7'
gem 'strong_migrations', '~> 0.8'
gem 'tty-prompt', '~> 0.23', require: false
gem 'twitter-text', '~> 3.1.0'
gem 'tzinfo-data', '~> 1.2022'
gem 'tzinfo-data', '~> 1.2023'
gem 'webpacker', '~> 5.4'
gem 'webpush', github: 'ClearlyClaire/webpush', ref: 'f14a4d52e201128b1b00245d11b6de80d6cfdcd9'
gem 'webauthn', '~> 2.5'
gem 'webauthn', '~> 3.0'
gem 'json-ld'
gem 'json-ld-preloaded', '~> 3.2'
@ -104,9 +103,10 @@ group :development, :test do
gem 'fabrication', '~> 2.30'
gem 'fuubar', '~> 2.5'
gem 'i18n-tasks', '~> 1.0', require: false
gem 'pry-byebug', '~> 3.10'
gem 'pry-rails', '~> 0.3'
gem 'rspec-rails', '~> 5.1'
gem 'rspec-rails', '~> 6.0'
gem 'rspec_chunked', '~> 0.6'
gem 'rubocop-capybara', require: false
gem 'rubocop-performance', require: false
gem 'rubocop-rails', require: false
gem 'rubocop-rspec', require: false
@ -118,11 +118,11 @@ group :production, :test do
end
group :test do
gem 'capybara', '~> 3.38'
gem 'climate_control', '~> 0.2'
gem 'capybara', '~> 3.39'
gem 'climate_control'
gem 'faker', '~> 3.1'
gem 'json-schema', '~> 3.0'
gem 'rack-test', '~> 2.0'
gem 'rack-test', '~> 2.1'
gem 'rails-controller-testing', '~> 1.0'
gem 'rspec_junit_formatter', '~> 0.6'
gem 'rspec-sidekiq', '~> 3.1'
@ -131,16 +131,15 @@ group :test do
end
group :development do
gem 'active_record_query_trace', '~> 1.8'
gem 'annotate', '~> 3.2'
gem 'better_errors', '~> 2.9'
gem 'binding_of_caller', '~> 1.0'
gem 'bullet', '~> 7.0'
gem 'letter_opener', '~> 1.8'
gem 'letter_opener_web', '~> 2.0'
gem 'memory_profiler'
gem 'brakeman', '~> 5.4', require: false
gem 'bundler-audit', '~> 0.9', require: false
gem 'haml_lint', require: false
gem 'capistrano', '~> 3.17'
gem 'capistrano-rails', '~> 1.6'
@ -160,3 +159,5 @@ gem 'xorcist', '~> 1.1'
gem 'hcaptcha', '~> 7.1'
gem 'cocoon', '~> 1.2'
gem 'net-http', '~> 0.3.2'

@ -7,43 +7,63 @@ GIT
hkdf (~> 0.2)
jwt (~> 2.0)
GIT
remote: https://github.com/kreeti/kt-paperclip.git
revision: 11abf222dc31bff71160a1d138b445214f434b2b
ref: 11abf222dc31bff71160a1d138b445214f434b2b
specs:
kt-paperclip (7.1.1)
activemodel (>= 4.2.0)
activesupport (>= 4.2.0)
marcel (~> 1.0.1)
mime-types
terrapin (~> 0.6.0)
GIT
remote: https://github.com/mastodon/rails-settings-cached.git
revision: 86328ef0bd04ce21cc0504ff5e334591e8c2ccab
branch: v0.6.6-aliases-true
specs:
rails-settings-cached (0.6.6)
rails (>= 4.2.0)
GEM
remote: https://rubygems.org/
specs:
actioncable (6.1.7.2)
actionpack (= 6.1.7.2)
activesupport (= 6.1.7.2)
actioncable (6.1.7.3)
actionpack (= 6.1.7.3)
activesupport (= 6.1.7.3)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (6.1.7.2)
actionpack (= 6.1.7.2)
activejob (= 6.1.7.2)
activerecord (= 6.1.7.2)
activestorage (= 6.1.7.2)
activesupport (= 6.1.7.2)
actionmailbox (6.1.7.3)
actionpack (= 6.1.7.3)
activejob (= 6.1.7.3)
activerecord (= 6.1.7.3)
activestorage (= 6.1.7.3)
activesupport (= 6.1.7.3)
mail (>= 2.7.1)
actionmailer (6.1.7.2)
actionpack (= 6.1.7.2)
actionview (= 6.1.7.2)
activejob (= 6.1.7.2)
activesupport (= 6.1.7.2)
actionmailer (6.1.7.3)
actionpack (= 6.1.7.3)
actionview (= 6.1.7.3)
activejob (= 6.1.7.3)
activesupport (= 6.1.7.3)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (6.1.7.2)
actionview (= 6.1.7.2)
activesupport (= 6.1.7.2)
actionpack (6.1.7.3)
actionview (= 6.1.7.3)
activesupport (= 6.1.7.3)
rack (~> 2.0, >= 2.0.9)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actiontext (6.1.7.2)
actionpack (= 6.1.7.2)
activerecord (= 6.1.7.2)
activestorage (= 6.1.7.2)
activesupport (= 6.1.7.2)
actiontext (6.1.7.3)
actionpack (= 6.1.7.3)
activerecord (= 6.1.7.3)
activestorage (= 6.1.7.3)
activesupport (= 6.1.7.3)
nokogiri (>= 1.8.5)
actionview (6.1.7.2)
activesupport (= 6.1.7.2)
actionview (6.1.7.3)
activesupport (= 6.1.7.3)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
@ -53,29 +73,28 @@ GEM
activemodel (>= 4.1, < 7.1)
case_transform (>= 0.2)
jsonapi-renderer (>= 0.1.1.beta1, < 0.3)
active_record_query_trace (1.8)
activejob (6.1.7.2)
activesupport (= 6.1.7.2)
activejob (6.1.7.3)
activesupport (= 6.1.7.3)
globalid (>= 0.3.6)
activemodel (6.1.7.2)
activesupport (= 6.1.7.2)
activerecord (6.1.7.2)
activemodel (= 6.1.7.2)
activesupport (= 6.1.7.2)
activestorage (6.1.7.2)
actionpack (= 6.1.7.2)
activejob (= 6.1.7.2)
activerecord (= 6.1.7.2)
activesupport (= 6.1.7.2)
activemodel (6.1.7.3)
activesupport (= 6.1.7.3)
activerecord (6.1.7.3)
activemodel (= 6.1.7.3)
activesupport (= 6.1.7.3)
activestorage (6.1.7.3)
actionpack (= 6.1.7.3)
activejob (= 6.1.7.3)
activerecord (= 6.1.7.3)
activesupport (= 6.1.7.3)
marcel (~> 1.0)
mini_mime (>= 1.1.0)
activesupport (6.1.7.2)
activesupport (6.1.7.3)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
addressable (2.8.1)
addressable (2.8.2)
public_suffix (>= 2.0.2, < 6.0)
aes_key_wrap (1.1.0)
airbrussh (1.4.1)
@ -90,22 +109,22 @@ GEM
attr_required (1.0.1)
awrence (1.2.1)
aws-eventstream (1.2.0)
aws-partitions (1.701.0)
aws-sdk-core (3.170.0)
aws-partitions (1.739.0)
aws-sdk-core (3.171.0)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.651.0)
aws-sigv4 (~> 1.5)
jmespath (~> 1, >= 1.6.1)
aws-sdk-kms (1.62.0)
aws-sdk-kms (1.63.0)
aws-sdk-core (~> 3, >= 3.165.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.119.0)
aws-sdk-s3 (1.120.0)
aws-sdk-core (~> 3, >= 3.165.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.4)
aws-sigv4 (1.5.2)
aws-eventstream (~> 1, >= 1.0.2)
bcrypt (3.1.17)
bcrypt (3.1.18)
better_errors (2.9.1)
coderay (>= 1.0.0)
erubi (>= 1.0.0)
@ -117,27 +136,22 @@ GEM
erubi (~> 1.4)
parser (>= 2.4)
smart_properties
bindata (2.4.14)
bindata (2.4.15)
binding_of_caller (1.0.0)
debug_inspector (>= 0.0.1)
blurhash (0.1.6)
ffi (~> 1.14)
blurhash (0.1.7)
bootsnap (1.16.0)
msgpack (~> 1.2)
brakeman (5.4.0)
browser (4.2.0)
browser (5.3.1)
brpoplpush-redis_script (0.1.3)
concurrent-ruby (~> 1.0, >= 1.0.5)
redis (>= 1.0, < 6)
builder (3.2.4)
bullet (7.0.7)
activesupport (>= 3.0.0)
uniform_notifier (~> 1.11)
bundler-audit (0.9.1)
bundler (>= 1.2.0, < 3)
thor (~> 1.0)
byebug (11.1.3)
capistrano (3.17.1)
capistrano (3.17.2)
airbrussh (>= 1.0.0)
i18n
rake (>= 10.0.0)
@ -152,7 +166,7 @@ GEM
sshkit (~> 1.3)
capistrano-yarn (2.0.2)
capistrano (~> 3.0)
capybara (3.38.0)
capybara (3.39.0)
addressable
matrix
mini_mime (>= 0.1.3)
@ -165,7 +179,7 @@ GEM
activesupport
cbor (0.5.9.6)
charlock_holmes (0.7.7)
chewy (7.2.4)
chewy (7.2.7)
activesupport (>= 5.2)
elasticsearch (>= 7.12.0, < 7.14.0)
elasticsearch-dsl
@ -174,9 +188,9 @@ GEM
cocoon (1.2.15)
coderay (1.1.3)
color_diff (0.1)
concurrent-ruby (1.2.0)
concurrent-ruby (1.2.2)
connection_pool (2.3.0)
cose (1.2.1)
cose (1.3.0)
cbor (~> 0.5.9)
openssl-signature_algorithm (~> 1.0)
crack (0.4.5)
@ -186,7 +200,7 @@ GEM
addressable
date (3.3.3)
debug_inspector (1.0.0)
devise (4.8.1)
devise (4.9.2)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 4.1.0)
@ -207,7 +221,7 @@ GEM
docile (1.4.0)
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
doorkeeper (5.6.4)
doorkeeper (5.6.6)
railties (>= 5)
dotenv (2.8.1)
dotenv-rails (2.8.1)
@ -231,7 +245,7 @@ GEM
fabrication (2.30.0)
faker (3.1.1)
i18n (>= 1.8.11, < 2)
faraday (1.9.3)
faraday (1.10.3)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
faraday-excon (~> 1.1)
@ -247,8 +261,8 @@ GEM
faraday-em_synchrony (1.0.0)
faraday-excon (1.1.0)
faraday-httpclient (1.0.1)
faraday-multipart (1.0.3)
multipart-post (>= 1.2, < 3)
faraday-multipart (1.0.4)
multipart-post (~> 2)
faraday-net_http (1.0.1)
faraday-net_http_persistent (1.2.0)
faraday-patron (1.0.0)
@ -273,27 +287,29 @@ GEM
fog-json (>= 1.0)
ipaddress (>= 0.8)
formatador (0.3.0)
fugit (1.7.1)
fugit (1.8.1)
et-orbi (~> 1, >= 1.2.7)
raabro (~> 1.4)
fuubar (2.5.1)
rspec-core (~> 3.0)
ruby-progressbar (~> 1.4)
gitlab-omniauth-openid-connect (0.10.1)
addressable (~> 2.7)
omniauth (>= 1.9, < 3)
openid_connect (~> 1.2)
globalid (1.1.0)
activesupport (>= 5.0)
hamlit (2.13.0)
haml (6.1.1)
temple (>= 0.8.2)
thor
tilt
hamlit-rails (0.2.3)
actionpack (>= 4.0.1)
activesupport (>= 4.0.1)
hamlit (>= 1.2.0)
railties (>= 4.0.1)
haml-rails (2.1.0)
actionpack (>= 5.1)
activesupport (>= 5.1)
haml (>= 4.0.6)
railties (>= 5.1)
haml_lint (0.45.0)
haml (>= 4.0, < 6.2)
parallel (~> 1.10)
rainbow
rubocop (>= 0.50.0)
sysexits (~> 1.1)
hashdiff (1.0.1)
hashie (5.0.0)
hcaptcha (7.1.0)
@ -351,7 +367,7 @@ GEM
json-schema (3.0.0)
addressable (>= 2.8)
jsonapi-renderer (0.2.2)
jwt (2.5.0)
jwt (2.7.0)
kaminari (1.2.2)
activesupport (>= 4.1.0)
kaminari-actionview (= 1.2.2)
@ -364,12 +380,6 @@ GEM
activerecord
kaminari-core (= 1.2.2)
kaminari-core (1.2.2)
kt-paperclip (7.1.1)
activemodel (>= 4.2.0)
activesupport (>= 4.2.0)
marcel (~> 1.0.1)
mime-types
terrapin (~> 0.6.0)
launchy (2.5.0)
addressable (~> 2.7)
letter_opener (1.8.1)
@ -388,10 +398,10 @@ GEM
activesupport (>= 4)
railties (>= 4)
request_store (~> 1.0)
loofah (2.19.1)
loofah (2.20.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.8.0.1)
mail (2.8.1)
mini_mime (>= 0.1.1)
net-imap
net-pop
@ -409,10 +419,12 @@ GEM
mime-types-data (3.2022.0105)
mini_mime (1.1.2)
mini_portile2 (2.8.1)
minitest (5.17.0)
minitest (5.18.0)
msgpack (1.6.0)
multi_json (1.15.0)
multipart-post (2.1.1)
multipart-post (2.3.0)
net-http (0.3.2)
uri
net-imap (0.3.4)
date
net-protocol
@ -421,13 +433,13 @@ GEM
net-protocol
net-protocol (0.2.1)
timeout
net-scp (4.0.0.rc1)
net-scp (4.0.0)
net-ssh (>= 2.6.5, < 8.0.0)
net-smtp (0.3.3)
net-protocol
net-ssh (7.0.1)
nio4r (2.5.8)
nokogiri (1.14.1)
nio4r (2.5.9)
nokogiri (1.14.2)
mini_portile2 (~> 2.8.0)
racc (~> 1.4)
nsa (0.2.8)
@ -435,7 +447,7 @@ GEM
concurrent-ruby (~> 1.0, >= 1.0.2)
sidekiq (>= 3.5)
statsd-ruby (~> 1.4, >= 1.4.0)
oj (3.13.23)
oj (3.14.2)
omniauth (1.9.2)
hashie (>= 3.4.6)
rack (>= 1.6.2, < 3)
@ -449,6 +461,9 @@ GEM
omniauth-saml (1.10.3)
omniauth (~> 1.3, >= 1.3.2)
ruby-saml (~> 1.9)
omniauth_openid_connect (0.6.1)
omniauth (>= 1.9, < 3)
openid_connect (~> 1.1)
openid_connect (1.4.2)
activemodel
attr_required (>= 1.0.0)
@ -460,19 +475,19 @@ GEM
validate_email
validate_url
webfinger (~> 1.2)
openssl (3.0.0)
openssl-signature_algorithm (1.2.1)
openssl (> 2.0, < 3.1)
openssl (3.1.0)
openssl-signature_algorithm (1.3.0)
openssl (> 2.0)
orm_adapter (0.5.0)
ox (2.14.14)
parallel (1.22.1)
parser (3.2.0.0)
parser (3.2.2.0)
ast (~> 2.4.1)
parslet (2.0.0)
pastel (0.8.0)
tty-color (~> 0.5)
pg (1.4.5)
pghero (3.1.0)
pg (1.4.6)
pghero (3.3.1)
activerecord (>= 6)
pkg-config (1.5.1)
posix-spawn (0.3.15)
@ -485,25 +500,17 @@ GEM
net-smtp
premailer (~> 1.7, >= 1.7.9)
private_address_check (0.5.0)
pry (0.14.1)
coderay (~> 1.1)
method_source (~> 1.0)
pry-byebug (3.10.1)
byebug (~> 11.0)
pry (>= 0.13, < 0.15)
pry-rails (0.3.9)
pry (>= 0.10.4)
public_suffix (5.0.1)
puma (5.6.5)
puma (6.2.1)
nio4r (~> 2.0)
pundit (2.3.0)
activesupport (>= 3.0.0)
raabro (1.4.0)
racc (1.6.2)
rack (2.2.6.2)
rack (2.2.6.4)
rack-attack (6.6.1)
rack (>= 1.0, < 3)
rack-cors (1.1.1)
rack-cors (2.0.1)
rack (>= 2.0.0)
rack-oauth2 (1.21.3)
activesupport
@ -513,22 +520,22 @@ GEM
rack (>= 2.1.0)
rack-proxy (0.7.6)
rack
rack-test (2.0.2)
rack-test (2.1.0)
rack (>= 1.3)
rails (6.1.7.2)
actioncable (= 6.1.7.2)
actionmailbox (= 6.1.7.2)
actionmailer (= 6.1.7.2)
actionpack (= 6.1.7.2)
actiontext (= 6.1.7.2)
actionview (= 6.1.7.2)
activejob (= 6.1.7.2)
activemodel (= 6.1.7.2)
activerecord (= 6.1.7.2)
activestorage (= 6.1.7.2)
activesupport (= 6.1.7.2)
rails (6.1.7.3)
actioncable (= 6.1.7.3)
actionmailbox (= 6.1.7.3)
actionmailer (= 6.1.7.3)
actionpack (= 6.1.7.3)
actiontext (= 6.1.7.3)
actionview (= 6.1.7.3)
activejob (= 6.1.7.3)
activemodel (= 6.1.7.3)
activerecord (= 6.1.7.3)
activestorage (= 6.1.7.3)
activesupport (= 6.1.7.3)
bundler (>= 1.15.0)
railties (= 6.1.7.2)
railties (= 6.1.7.3)
sprockets-rails (>= 2.0.0)
rails-controller-testing (1.0.5)
actionpack (>= 5.0.1.rc1)
@ -542,11 +549,9 @@ GEM
rails-i18n (6.0.0)
i18n (>= 0.7, < 2)
railties (>= 6.0.0, < 7)
rails-settings-cached (0.6.6)
rails (>= 4.2.0)
railties (6.1.7.2)
actionpack (= 6.1.7.2)
activesupport (= 6.1.7.2)
railties (6.1.7.3)
actionpack (= 6.1.7.3)
activesupport (= 6.1.7.3)
method_source
rake (>= 12.2)
thor (~> 1.0)
@ -557,17 +562,17 @@ GEM
rdf-normalize (0.5.1)
rdf (~> 3.2)
redcarpet (3.6.0)
redis (4.5.1)
redis (4.8.1)
redis-namespace (1.10.0)
redis (>= 4)
redlock (1.3.2)
redis (>= 3.0.0, < 6.0)
regexp_parser (2.6.2)
regexp_parser (2.7.0)
request_store (1.5.1)
rack (>= 1.4)
responders (3.0.1)
actionpack (>= 5.0)
railties (>= 5.0)
responders (3.1.0)
actionpack (>= 5.2)
railties (>= 5.2)
rexml (3.2.5)
rotp (6.2.0)
rpam2 (4.0.2)
@ -575,53 +580,54 @@ GEM
chunky_png (~> 1.0)
rqrcode_core (~> 1.0)
rqrcode_core (1.2.0)
rspec-core (3.11.0)
rspec-support (~> 3.11.0)
rspec-expectations (3.11.0)
rspec-core (3.12.1)
rspec-support (~> 3.12.0)
rspec-expectations (3.12.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.11.0)
rspec-mocks (3.11.1)
rspec-support (~> 3.12.0)
rspec-mocks (3.12.3)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.11.0)
rspec-rails (5.1.2)
actionpack (>= 5.2)
activesupport (>= 5.2)
railties (>= 5.2)
rspec-core (~> 3.10)
rspec-expectations (~> 3.10)
rspec-mocks (~> 3.10)
rspec-support (~> 3.10)
rspec-support (~> 3.12.0)
rspec-rails (6.0.1)
actionpack (>= 6.1)
activesupport (>= 6.1)
railties (>= 6.1)
rspec-core (~> 3.11)
rspec-expectations (~> 3.11)
rspec-mocks (~> 3.11)
rspec-support (~> 3.11)
rspec-sidekiq (3.1.0)
rspec-core (~> 3.0, >= 3.0.0)
sidekiq (>= 2.4.0)
rspec-support (3.11.1)
rspec-support (3.12.0)
rspec_chunked (0.6)
rspec_junit_formatter (0.6.0)
rspec-core (>= 2, < 4, != 2.12.0)
rubocop (1.44.1)
rubocop (1.49.0)
json (~> 2.3)
parallel (~> 1.10)
parser (>= 3.2.0.0)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.24.1, < 2.0)
rubocop-ast (>= 1.28.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.24.1)
parser (>= 3.1.1.0)
rubocop-capybara (2.17.0)
rubocop-ast (1.28.0)
parser (>= 3.2.1.0)
rubocop-capybara (2.17.1)
rubocop (~> 1.41)
rubocop-performance (1.16.0)
rubocop (>= 1.7.0, < 2.0)
rubocop-ast (>= 0.4.0)
rubocop-rails (2.17.4)
rubocop-rails (2.18.0)
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 1.33.0, < 2.0)
rubocop-rspec (2.18.1)
rubocop-rspec (2.19.0)
rubocop (~> 1.33)
rubocop-capybara (~> 2.17)
ruby-progressbar (1.11.0)
ruby-progressbar (1.13.0)
ruby-saml (1.13.0)
nokogiri (>= 1.10.5)
rexml
@ -643,10 +649,9 @@ GEM
redis (>= 4.5.0, < 5)
sidekiq-bulk (0.2.0)
sidekiq
sidekiq-scheduler (4.0.3)
redis (>= 4.2.0)
sidekiq-scheduler (5.0.2)
rufus-scheduler (~> 3.2)
sidekiq (>= 4, < 7)
sidekiq (>= 6, < 8)
tilt (>= 1.4.0)
sidekiq-unique-jobs (7.1.29)
brpoplpush-redis_script (> 0.1.1, <= 2.0.0)
@ -673,30 +678,31 @@ GEM
actionpack (>= 5.2)
activesupport (>= 5.2)
sprockets (>= 3.0.0)
sshkit (1.21.2)
sshkit (1.21.4)
net-scp (>= 1.1.2)
net-ssh (>= 2.8.0)
stackprof (0.2.23)
stackprof (0.2.24)
statsd-ruby (1.5.0)
stoplight (3.0.1)
redlock (~> 1.0)
strong_migrations (0.7.9)
activerecord (>= 5)
strong_migrations (0.8.0)
activerecord (>= 5.2)
swd (1.3.0)
activesupport (>= 3)
attr_required (>= 0.0.5)
httpclient (>= 2.4)
temple (0.8.2)
sysexits (1.2.0)
temple (0.10.0)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
terrapin (0.6.0)
climate_control (>= 0.0.3, < 1.0)
thor (1.2.1)
tilt (2.0.11)
timeout (0.3.1)
tpm-key_attestation (0.11.0)
tilt (2.1.0)
timeout (0.3.2)
tpm-key_attestation (0.12.0)
bindata (~> 2.4)
openssl (> 2.0, < 3.1)
openssl (> 2.0)
openssl-signature_algorithm (~> 1.0)
tty-color (0.6.0)
tty-cursor (0.7.1)
@ -713,13 +719,13 @@ GEM
unf (~> 0.1.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
tzinfo-data (1.2022.7)
tzinfo-data (1.2023.3)
tzinfo (>= 1.0.0)
unf (0.1.4)
unf_ext
unf_ext (0.0.8.2)
unicode-display_width (2.4.2)
uniform_notifier (1.16.0)
uri (0.12.1)
validate_email (0.1.6)
activemodel (>= 3.0)
mail (>= 2.2.5)
@ -728,15 +734,15 @@ GEM
public_suffix
warden (1.2.9)
rack (>= 2.0.9)
webauthn (2.5.2)
webauthn (3.0.0)
android_key_attestation (~> 0.3.0)
awrence (~> 1.1)
bindata (~> 2.4)
cbor (~> 0.5.9)
cose (~> 1.1)
openssl (>= 2.2, < 3.1)
openssl (>= 2.2)
safety_net_attestation (~> 0.4.0)
tpm-key_attestation (~> 0.11.0)
tpm-key_attestation (~> 0.12.0)
webfinger (1.2.0)
activesupport
httpclient (>= 2.4)
@ -756,38 +762,36 @@ GEM
xorcist (1.1.3)
xpath (3.2.0)
nokogiri (~> 1.8)
zeitwerk (2.6.6)
zeitwerk (2.6.7)
PLATFORMS
ruby
DEPENDENCIES
active_model_serializers (~> 0.10)
active_record_query_trace (~> 1.8)
addressable (~> 2.8)
annotate (~> 3.2)
aws-sdk-s3 (~> 1.119)
aws-sdk-s3 (~> 1.120)
better_errors (~> 2.9)
binding_of_caller (~> 1.0)
blurhash (~> 0.1)
bootsnap (~> 1.16.0)
brakeman (~> 5.4)
browser
bullet (~> 7.0)
bundler-audit (~> 0.9)
capistrano (~> 3.17)
capistrano-rails (~> 1.6)
capistrano-rbenv (~> 2.2)
capistrano-yarn (~> 2.0)
capybara (~> 3.38)
capybara (~> 3.39)
charlock_holmes (~> 0.7.7)
chewy (~> 7.2)
climate_control (~> 0.2)
climate_control
cocoon (~> 1.2)
color_diff (~> 0.1)
concurrent-ruby
connection_pool
devise (~> 4.8)
devise (~> 4.9)
devise-two-factor (~> 4.0)
devise_pam_authenticatable2 (~> 9.2)
discard (~> 1.2)
@ -801,8 +805,8 @@ DEPENDENCIES
fog-core (<= 2.4.0)
fog-openstack (~> 0.3)
fuubar (~> 2.5)
gitlab-omniauth-openid-connect (~> 0.10.1)
hamlit-rails (~> 0.2)
haml-rails (~> 2.0)
haml_lint
hcaptcha (~> 7.1)
hiredis (~> 0.6)
htmlentities (~> 4.3)
@ -815,7 +819,7 @@ DEPENDENCIES
json-ld-preloaded (~> 3.2)
json-schema (~> 3.0)
kaminari (~> 1.2)
kt-paperclip (~> 7.1)
kt-paperclip (~> 7.1)!
letter_opener (~> 1.8)
letter_opener_web (~> 2.0)
link_header (~> 0.0)
@ -824,14 +828,16 @@ DEPENDENCIES
mario-redis-lock (~> 1.2)
memory_profiler
mime-types (~> 3.4.1)
net-http (~> 0.3.2)
net-ldap (~> 0.17)
nokogiri (~> 1.14)
nsa (~> 0.2)
oj (~> 3.13)
oj (~> 3.14)
omniauth (~> 1.9)
omniauth-cas (~> 2.0)
omniauth-rails_csrf_protection (~> 0.1)
omniauth-saml (~> 1.10)
omniauth_openid_connect (~> 0.6.1)
ox (~> 2.14)
parslet
pg (~> 1.4)
@ -840,29 +846,28 @@ DEPENDENCIES
posix-spawn
premailer-rails
private_address_check (~> 0.5)
pry-byebug (~> 3.10)
pry-rails (~> 0.3)
public_suffix (~> 5.0)
puma (~> 5.6)
puma (~> 6.2)
pundit (~> 2.3)
rack (~> 2.2.6)
rack-attack (~> 6.6)
rack-cors (~> 1.1)
rack-test (~> 2.0)
rack-cors (~> 2.0)
rack-test (~> 2.1)
rails (~> 6.1.7)
rails-controller-testing (~> 1.0)
rails-i18n (~> 6.0)
rails-settings-cached (~> 0.6)
rails-settings-cached (~> 0.6)!
rdf-normalize (~> 0.5)
redcarpet (~> 3.6)
redis (~> 4.5)
redis-namespace (~> 1.10)
rexml (~> 3.2)
rqrcode (~> 2.1)
rspec-rails (~> 5.1)
rspec-rails (~> 6.0)
rspec-sidekiq (~> 3.1)
rspec_chunked (~> 0.6)
rspec_junit_formatter (~> 0.6)
rubocop
rubocop-capybara
rubocop-performance
rubocop-rails
rubocop-rspec
@ -871,7 +876,7 @@ DEPENDENCIES
scenic (~> 1.7)
sidekiq (~> 6.5)
sidekiq-bulk (~> 0.2.0)
sidekiq-scheduler (~> 4.0)
sidekiq-scheduler (~> 5.0)
sidekiq-unique-jobs (~> 7.1)
simple-navigation (~> 4.4)
simple_form (~> 5.2)
@ -880,12 +885,12 @@ DEPENDENCIES
sprockets-rails (~> 3.4)
stackprof
stoplight (~> 3.0.1)
strong_migrations (~> 0.7)
strong_migrations (~> 0.8)
thor (~> 1.2)
tty-prompt (~> 0.23)
twitter-text (~> 3.1.0)
tzinfo-data (~> 1.2022)
webauthn (~> 2.5)
tzinfo-data (~> 1.2023)
webauthn (~> 3.0)
webmock (~> 3.18)
webpacker (~> 5.4)
webpush!

@ -1,6 +1,6 @@
# Mastodon Glitch Edition #
# Mastodon Glitch Edition
> Now with automated deploys!
> Now with automated deploys!
[![Build Status](https://img.shields.io/circleci/project/github/glitch-soc/mastodon.svg)][circleci]
[![Code Climate](https://img.shields.io/codeclimate/maintainability/glitch-soc/mastodon.svg)][code_climate]

@ -2,7 +2,7 @@
If you believe you've identified a security vulnerability in Mastodon (a bug that allows something to happen that shouldn't be possible), you can reach us at <security@joinmastodon.org>.
You should *not* report such issues on GitHub or in other public spaces to give us time to publish a fix for the issue without exposing Mastodon's users to increased risk.
You should _not_ report such issues on GitHub or in other public spaces to give us time to publish a fix for the issue without exposing Mastodon's users to increased risk.
## Scope
@ -11,7 +11,8 @@ A "vulnerability in Mastodon" is a vulnerability in the code distributed through
## Supported Versions
| Version | Supported |
| ------- | ----------|
| ------- | --------- |
| 4.1.x | Yes |
| 4.0.x | Yes |
| 3.5.x | Yes |
| < 3.5 | No |

@ -38,27 +38,27 @@ class StatusesIndex < Chewy::Index
index_scope ::Status.unscoped.kept.without_reblogs.includes(:media_attachments, :preloadable_poll)
crutch :mentions do |collection|
data = ::Mention.where(status_id: collection.map(&:id)).where(account: Account.local, silent: false).pluck(:status_id, :account_id)
data = ::Mention.where(status_id: collection.map(&:id)).where(silent: false).pluck(:status_id, :account_id)
data.each.with_object({}) { |(id, name), result| (result[id] ||= []).push(name) }
end
crutch :favourites do |collection|
data = ::Favourite.where(status_id: collection.map(&:id)).where(account: Account.local).pluck(:status_id, :account_id)
data = ::Favourite.where(status_id: collection.map(&:id)).pluck(:status_id, :account_id)
data.each.with_object({}) { |(id, name), result| (result[id] ||= []).push(name) }
end
crutch :reblogs do |collection|
data = ::Status.where(reblog_of_id: collection.map(&:id)).where(account: Account.local).pluck(:reblog_of_id, :account_id)
data = ::Status.where(reblog_of_id: collection.map(&:id)).pluck(:reblog_of_id, :account_id)
data.each.with_object({}) { |(id, name), result| (result[id] ||= []).push(name) }
end
crutch :bookmarks do |collection|
data = ::Bookmark.where(status_id: collection.map(&:id)).where(account: Account.local).pluck(:status_id, :account_id)
data = ::Bookmark.where(status_id: collection.map(&:id)).pluck(:status_id, :account_id)
data.each.with_object({}) { |(id, name), result| (result[id] ||= []).push(name) }
end
crutch :votes do |collection|
data = ::PollVote.joins(:poll).where(poll: { status_id: collection.map(&:id) }).where(account: Account.local).pluck(:status_id, :account_id)
data = ::PollVote.joins(:poll).where(poll: { status_id: collection.map(&:id) }).pluck(:status_id, :account_id)
data.each.with_object({}) { |(id, name), result| (result[id] ||= []).push(name) }
end
@ -69,7 +69,5 @@ class StatusesIndex < Chewy::Index
field :text, type: 'text', value: ->(status) { status.searchable_text } do
field :stemmed, type: 'text', analyzer: 'content'
end
field :searchable_by, type: 'long', value: ->(status, crutches) { status.searchable_by(crutches) }
end
end

@ -18,13 +18,11 @@ module Admin
private
def redis_info
@redis_info ||= begin
if redis.is_a?(Redis::Namespace)
redis.redis.info
else
redis.info
end
end
@redis_info ||= if redis.is_a?(Redis::Namespace)
redis.redis.info
else
redis.info
end
end
end
end

@ -2,7 +2,7 @@
module Admin
class DomainBlocksController < BaseController
before_action :set_domain_block, only: [:show, :destroy, :edit, :update]
before_action :set_domain_block, only: [:destroy, :edit, :update]
def batch
authorize :domain_block, :create?
@ -90,9 +90,7 @@ module Admin
end
def action_from_button
if params[:save]
'save'
end
'save' if params[:save]
end
end
end

@ -2,8 +2,6 @@
module Admin
class EmailDomainBlocksController < BaseController
before_action :set_email_domain_block, only: [:show, :destroy]
def index
authorize :email_domain_block, :index?
@ -59,10 +57,6 @@ module Admin
private
def set_email_domain_block
@email_domain_block = EmailDomainBlock.find(params[:id])
end
def set_resolved_records
Resolv::DNS.open do |dns|
dns.timeouts = 5

@ -13,7 +13,7 @@ class Api::V1::Accounts::CredentialsController < Api::BaseController
def update
@account = current_account
UpdateAccountService.new.call(@account, account_params, raise_error: true)
UserSettingsDecorator.new(current_user).update(user_settings_params) if user_settings_params
current_user.update(user_params) if user_params
ActivityPub::UpdateDistributionWorker.perform_async(@account.id)
render json: @account, serializer: REST::CredentialAccountSerializer
end
@ -34,15 +34,17 @@ class Api::V1::Accounts::CredentialsController < Api::BaseController
)
end
def user_settings_params
def user_params
return nil if params[:source].blank?
source_params = params.require(:source)
{
'setting_default_privacy' => source_params.fetch(:privacy, @account.user.setting_default_privacy),
'setting_default_sensitive' => source_params.fetch(:sensitive, @account.user.setting_default_sensitive),
'setting_default_language' => source_params.fetch(:language, @account.user.setting_default_language),
settings_attributes: {
default_privacy: source_params.fetch(:privacy, @account.user.setting_default_privacy),
default_sensitive: source_params.fetch(:sensitive, @account.user.setting_default_sensitive),
default_language: source_params.fetch(:language, @account.user.setting_default_language),
},
}
end
end

@ -45,15 +45,11 @@ class Api::V1::Accounts::FollowerAccountsController < Api::BaseController
end
def next_path
if records_continue?
api_v1_account_followers_url pagination_params(max_id: pagination_max_id)
end
api_v1_account_followers_url pagination_params(max_id: pagination_max_id) if records_continue?
end
def prev_path
unless @accounts.empty?
api_v1_account_followers_url pagination_params(since_id: pagination_since_id)
end
api_v1_account_followers_url pagination_params(since_id: pagination_since_id) unless @accounts.empty?
end
def pagination_max_id

@ -45,15 +45,11 @@ class Api::V1::Accounts::FollowingAccountsController < Api::BaseController
end
def next_path
if records_continue?
api_v1_account_following_index_url pagination_params(max_id: pagination_max_id)
end
api_v1_account_following_index_url pagination_params(max_id: pagination_max_id) if records_continue?
end
def prev_path
unless @accounts.empty?
api_v1_account_following_index_url pagination_params(since_id: pagination_since_id)
end
api_v1_account_following_index_url pagination_params(since_id: pagination_since_id) unless @accounts.empty?
end
def pagination_max_id

@ -39,15 +39,11 @@ class Api::V1::Accounts::StatusesController < Api::BaseController
end
def next_path
if records_continue?
api_v1_account_statuses_url pagination_params(max_id: pagination_max_id)
end
api_v1_account_statuses_url pagination_params(max_id: pagination_max_id) if records_continue?
end
def prev_path
unless @statuses.empty?
api_v1_account_statuses_url pagination_params(min_id: pagination_since_id)
end
api_v1_account_statuses_url pagination_params(min_id: pagination_since_id) unless @statuses.empty?
end
def records_continue?

@ -30,7 +30,7 @@ class Api::V1::AccountsController < Api::BaseController
self.response_body = Oj.dump(response.body)
self.status = response.status
rescue ActiveRecord::RecordInvalid => e
render json: ValidationErrorFormatter.new(e, 'account.username': :username, 'invite_request.text': :reason).as_json, status: :unprocessable_entity
render json: ValidationErrorFormatter.new(e, 'account.username': :username, 'invite_request.text': :reason).as_json, status: 422
end
def follow

@ -120,9 +120,7 @@ class Api::V1::Admin::AccountsController < Api::BaseController
translated_params[:status] = status.to_s if params[status].present?
end
if params[:staff].present?
translated_params[:role_ids] = UserRole.that_can(:manage_reports).map(&:id)
end
translated_params[:role_ids] = UserRole.that_can(:manage_reports).map(&:id) if params[:staff].present?
translated_params
end

@ -18,9 +18,7 @@ class Api::V1::AnnouncementsController < Api::BaseController
private
def set_announcements
@announcements = begin
Announcement.published.chronological
end
@announcements = Announcement.published.chronological
end
def set_announcement

@ -33,15 +33,11 @@ class Api::V1::BlocksController < Api::BaseController
end
def next_path
if records_continue?
api_v1_blocks_url pagination_params(max_id: pagination_max_id)
end
api_v1_blocks_url pagination_params(max_id: pagination_max_id) if records_continue?
end
def prev_path
unless paginated_blocks.empty?
api_v1_blocks_url pagination_params(since_id: pagination_since_id)
end
api_v1_blocks_url pagination_params(since_id: pagination_since_id) unless paginated_blocks.empty?
end
def pagination_max_id

@ -40,15 +40,11 @@ class Api::V1::ConversationsController < Api::BaseController
end
def next_path
if records_continue?
api_v1_conversations_url pagination_params(max_id: pagination_max_id)
end
api_v1_conversations_url pagination_params(max_id: pagination_max_id) if records_continue?
end
def prev_path
unless @conversations.empty?
api_v1_conversations_url pagination_params(min_id: pagination_since_id)
end
api_v1_conversations_url pagination_params(min_id: pagination_since_id) unless @conversations.empty?
end
def pagination_max_id

@ -43,15 +43,11 @@ class Api::V1::DomainBlocksController < Api::BaseController
end
def next_path
if records_continue?
api_v1_domain_blocks_url pagination_params(max_id: pagination_max_id)
end
api_v1_domain_blocks_url pagination_params(max_id: pagination_max_id) if records_continue?
end
def prev_path
unless @blocks.empty?
api_v1_domain_blocks_url pagination_params(since_id: pagination_since_id)
end
api_v1_domain_blocks_url pagination_params(since_id: pagination_since_id) unless @blocks.empty?
end
def pagination_max_id

@ -15,10 +15,10 @@ class Api::V1::Emails::ConfirmationsController < Api::BaseController
private
def require_user_owned_by_application!
render json: { error: 'This method is only available to the application the user originally signed-up with' }, status: :forbidden unless current_user && current_user.created_by_application_id == doorkeeper_token.application_id
render json: { error: 'This method is only available to the application the user originally signed-up with' }, status: 403 unless current_user && current_user.created_by_application_id == doorkeeper_token.application_id
end
def require_user_not_confirmed!
render json: { error: 'This method is only available while the e-mail is awaiting confirmation' }, status: :forbidden unless !current_user.confirmed? || current_user.unconfirmed_email.present?
render json: { error: 'This method is only available while the e-mail is awaiting confirmation' }, status: 403 unless !current_user.confirmed? || current_user.unconfirmed_email.present?
end
end

@ -35,17 +35,13 @@ class Api::V1::EndorsementsController < Api::BaseController
def next_path
return if unlimited?
if records_continue?
api_v1_endorsements_url pagination_params(max_id: pagination_max_id)
end
api_v1_endorsements_url pagination_params(max_id: pagination_max_id) if records_continue?
end
def prev_path
return if unlimited?
unless @accounts.empty?
api_v1_endorsements_url pagination_params(since_id: pagination_since_id)
end
api_v1_endorsements_url pagination_params(since_id: pagination_since_id) unless @accounts.empty?
end
def pagination_max_id

@ -36,15 +36,11 @@ class Api::V1::FavouritesController < Api::BaseController
end
def next_path
if records_continue?
api_v1_favourites_url pagination_params(max_id: pagination_max_id)
end
api_v1_favourites_url pagination_params(max_id: pagination_max_id) if records_continue?
end
def prev_path
unless results.empty?
api_v1_favourites_url pagination_params(min_id: pagination_since_id)
end
api_v1_favourites_url pagination_params(min_id: pagination_since_id) unless results.empty?
end
def pagination_max_id

@ -53,15 +53,11 @@ class Api::V1::FollowRequestsController < Api::BaseController
end
def next_path
if records_continue?
api_v1_follow_requests_url pagination_params(max_id: pagination_max_id)
end
api_v1_follow_requests_url pagination_params(max_id: pagination_max_id) if records_continue?
end
def prev_path
unless @accounts.empty?
api_v1_follow_requests_url pagination_params(since_id: pagination_since_id)
end
api_v1_follow_requests_url pagination_params(since_id: pagination_since_id) unless @accounts.empty?
end
def pagination_max_id

@ -0,0 +1,23 @@
# frozen_string_literal: true
class Api::V1::Instances::TranslationLanguagesController < Api::BaseController
skip_before_action :require_authenticated_user!, unless: :whitelist_mode?
before_action :set_languages
def show
expires_in 1.day, public: true
render json: @languages
end
private
def set_languages
if TranslationService.configured?
@languages = Rails.cache.fetch('translation_service/languages', expires_in: 7.days, race_condition_ttl: 1.hour) { TranslationService.configured.languages }
@languages['und'] = @languages.delete(nil) if @languages.key?(nil)
else
@languages = {}
end
end
end

@ -62,17 +62,13 @@ class Api::V1::Lists::AccountsController < Api::BaseController
def next_path
return if unlimited?
if records_continue?
api_v1_list_accounts_url pagination_params(max_id: pagination_max_id)
end
api_v1_list_accounts_url pagination_params(max_id: pagination_max_id) if records_continue?
end
def prev_path
return if unlimited?
unless @accounts.empty?
api_v1_list_accounts_url pagination_params(since_id: pagination_since_id)
end
api_v1_list_accounts_url pagination_params(since_id: pagination_since_id) unless @accounts.empty?
end
def pagination_max_id

@ -33,15 +33,11 @@ class Api::V1::MutesController < Api::BaseController
end
def next_path
if records_continue?
api_v1_mutes_url pagination_params(max_id: pagination_max_id)
end
api_v1_mutes_url pagination_params(max_id: pagination_max_id) if records_continue?
end
def prev_path
unless paginated_mutes.empty?
api_v1_mutes_url pagination_params(since_id: pagination_since_id)
end
api_v1_mutes_url pagination_params(since_id: pagination_since_id) unless paginated_mutes.empty?
end
def pagination_max_id

@ -28,7 +28,7 @@ class Api::V1::NotificationsController < Api::BaseController
end
def dismiss
current_account.notifications.find_by!(id: params[:id]).destroy!
current_account.notifications.find(params[:id]).destroy!
render_empty
end
@ -67,15 +67,11 @@ class Api::V1::NotificationsController < Api::BaseController
end
def next_path
unless @notifications.empty?
api_v1_notifications_url pagination_params(max_id: pagination_max_id)
end
api_v1_notifications_url pagination_params(max_id: pagination_max_id) unless @notifications.empty?
end
def prev_path
unless @notifications.empty?
api_v1_notifications_url pagination_params(min_id: pagination_since_id)
end
api_v1_notifications_url pagination_params(min_id: pagination_since_id) unless @notifications.empty?
end
def pagination_max_id

@ -52,15 +52,11 @@ class Api::V1::ScheduledStatusesController < Api::BaseController
end
def next_path
if records_continue?
api_v1_scheduled_statuses_url pagination_params(max_id: pagination_max_id)
end
api_v1_scheduled_statuses_url pagination_params(max_id: pagination_max_id) if records_continue?
end
def prev_path
unless @statuses.empty?
api_v1_scheduled_statuses_url pagination_params(min_id: pagination_since_id)
end
api_v1_scheduled_statuses_url pagination_params(min_id: pagination_since_id) unless @statuses.empty?
end
def records_continue?

@ -41,15 +41,11 @@ class Api::V1::Statuses::FavouritedByAccountsController < Api::BaseController
end
def next_path
if records_continue?
api_v1_status_favourited_by_index_url pagination_params(max_id: pagination_max_id)
end
api_v1_status_favourited_by_index_url pagination_params(max_id: pagination_max_id) if records_continue?
end
def prev_path
unless @accounts.empty?
api_v1_status_favourited_by_index_url pagination_params(since_id: pagination_since_id)
end
api_v1_status_favourited_by_index_url pagination_params(since_id: pagination_since_id) unless @accounts.empty?
end
def pagination_max_id

@ -37,15 +37,11 @@ class Api::V1::Statuses::RebloggedByAccountsController < Api::BaseController
end
def next_path
if records_continue?
api_v1_status_reblogged_by_index_url pagination_params(max_id: pagination_max_id)
end
api_v1_status_reblogged_by_index_url pagination_params(max_id: pagination_max_id) if records_continue?
end
def prev_path
unless @accounts.empty?
api_v1_status_reblogged_by_index_url pagination_params(since_id: pagination_since_id)
end
api_v1_status_reblogged_by_index_url pagination_params(since_id: pagination_since_id) unless @accounts.empty?
end
def pagination_max_id

@ -64,11 +64,18 @@ class Api::V1::StatusesController < Api::BaseController
application: doorkeeper_token.application,
poll: status_params[:poll],
content_type: status_params[:content_type],
allowed_mentions: status_params[:allowed_mentions],
idempotency: request.headers['Idempotency-Key'],
with_rate_limit: true
)
render json: @status, serializer: @status.is_a?(ScheduledStatus) ? REST::ScheduledStatusSerializer : REST::StatusSerializer
rescue PostStatusService::UnexpectedMentionsError => e
unexpected_accounts = ActiveModel::Serializer::CollectionSerializer.new(
e.accounts,
serializer: REST::AccountSerializer
)
render json: { error: e.message, unexpected_accounts: unexpected_accounts }, status: 422
end
def update
@ -131,6 +138,7 @@ class Api::V1::StatusesController < Api::BaseController
:language,
:scheduled_at,
:content_type,
allowed_mentions: [],
media_ids: [],
media_attributes: [
:id,

@ -5,7 +5,7 @@ class Api::V1::StreamingController < Api::BaseController
if Rails.configuration.x.streaming_api_base_url == request.host
not_found
else
redirect_to streaming_api_url, status: 301
redirect_to streaming_api_url, status: 301, allow_other_host: true
end
end

@ -25,6 +25,7 @@ class Api::V1::TagsController < Api::BaseController
def set_or_create_tag
return not_found unless Tag::HASHTAG_NAME_RE.match?(params[:id])
@tag = Tag.find_normalized(params[:id]) || Tag.new(name: Tag.normalize(params[:id]), display_name: params[:id])
end
end

@ -40,7 +40,7 @@ class Api::V1::Timelines::PublicController < Api::BaseController
only_media: truthy_param?(:only_media),
allow_local_only: truthy_param?(:allow_local_only),
with_replies: Setting.show_replies_in_public_timelines,
with_reblogs: Setting.show_reblogs_in_public_timelines,
with_reblogs: Setting.show_reblogs_in_public_timelines
)
end

@ -18,13 +18,11 @@ class Api::V1::Trends::LinksController < Api::BaseController
end
def set_links
@links = begin
if enabled?
links_from_trends.offset(offset_param).limit(limit_param(DEFAULT_LINKS_LIMIT))
else
[]
end
end
@links = if enabled?
links_from_trends.offset(offset_param).limit(limit_param(DEFAULT_LINKS_LIMIT))
else
[]
end
end
def links_from_trends

@ -16,13 +16,11 @@ class Api::V1::Trends::StatusesController < Api::BaseController
end
def set_statuses
@statuses = begin
if enabled?
cache_collection(statuses_from_trends.offset(offset_param).limit(limit_param(DEFAULT_STATUSES_LIMIT)), Status)
else
[]
end
end
@statuses = if enabled?
cache_collection(statuses_from_trends.offset(offset_param).limit(limit_param(DEFAULT_STATUSES_LIMIT)), Status)
else
[]
end
end
def statuses_from_trends

@ -18,13 +18,11 @@ class Api::V1::Trends::TagsController < Api::BaseController
end
def set_tags
@tags = begin
if enabled?
tags_from_trends.offset(offset_param).limit(limit_param(DEFAULT_TAGS_LIMIT))
else
[]
end
end
@tags = if enabled?
tags_from_trends.offset(offset_param).limit(limit_param(DEFAULT_TAGS_LIMIT))
else
[]
end
end
def tags_from_trends

@ -25,9 +25,7 @@ class Api::V2::Admin::AccountsController < Api::V1::Admin::AccountsController
def translated_filter_params
translated_params = filter_params.slice(*AccountFilter::KEYS)
if params[:permissions] == 'staff'
translated_params[:role_ids] = UserRole.that_can(:manage_reports).map(&:id)
end
translated_params[:role_ids] = UserRole.that_can(:manage_reports).map(&:id) if params[:permissions] == 'staff'
translated_params
end

@ -18,6 +18,8 @@ class ApplicationController < ActionController::Base
helper_method :current_skin
helper_method :single_user_mode?
helper_method :use_seamless_external_login?
helper_method :omniauth_only?
helper_method :sso_account_settings
helper_method :whitelist_mode?
rescue_from ActionController::ParameterMissing, Paperclip::AdapterRegistry::NoHandlerError, with: :bad_request
@ -63,7 +65,11 @@ class ApplicationController < ActionController::Base
end
def after_sign_out_path_for(_resource_or_scope)
new_user_session_path
if ENV['OMNIAUTH_ONLY'] == 'true' && ENV['OIDC_ENABLED'] == 'true'
'/auth/auth/openid_connect/logout'
else
new_user_session_path
end
end
protected
@ -116,6 +122,14 @@ class ApplicationController < ActionController::Base
Devise.pam_authentication || Devise.ldap_authentication
end
def omniauth_only?
ENV['OMNIAUTH_ONLY'] == 'true'
end
def sso_account_settings
ENV.fetch('SSO_ACCOUNT_SETTINGS')
end
def current_account
return @current_account if defined?(@current_account)

@ -15,12 +15,6 @@ class Auth::ConfirmationsController < Devise::ConfirmationsController
skip_before_action :require_functional!
def new
super
resource.email = current_user.unconfirmed_email || current_user.email if user_signed_in?
end
def show
old_session_values = session.to_hash
reset_session
@ -29,6 +23,12 @@ class Auth::ConfirmationsController < Devise::ConfirmationsController
super
end
def new
super
resource.email = current_user.unconfirmed_email || current_user.email if user_signed_in?
end
def confirm_captcha
check_captcha! do |message|
flash.now[:alert] = message
@ -51,6 +51,7 @@ class Auth::ConfirmationsController < Devise::ConfirmationsController
# step.
confirmation_token = params[:confirmation_token]
return if confirmation_token.nil?
@confirmation_user = User.find_first_by_auth_conditions(confirmation_token: confirmation_token)
end

@ -33,7 +33,7 @@ class Auth::OmniauthCallbacksController < Devise::OmniauthCallbacksController
def after_sign_in_path_for(resource)
if resource.email_present?
root_path
stored_location_for(resource) || root_path
else
auth_setup_path(missing_email: '1')
end

@ -31,9 +31,7 @@ class Auth::RegistrationsController < Devise::RegistrationsController
def update
super do |resource|
if resource.saved_change_to_encrypted_password?
resource.clear_other_sessions(current_session.session_id)
end
resource.clear_other_sessions(current_session.session_id) if resource.saved_change_to_encrypted_password?
end
end
@ -49,7 +47,7 @@ class Auth::RegistrationsController < Devise::RegistrationsController
super(hash)
resource.locale = I18n.locale
resource.invite_code = params[:invite_code] if resource.invite_code.blank?
resource.invite_code = @invite&.code if resource.invite_code.blank?
resource.registration_form_time = session[:registration_form_time]
resource.sign_up_ip = request.remote_ip

@ -53,9 +53,9 @@ class Auth::SessionsController < Devise::SessionsController
session[:webauthn_challenge] = options_for_get.challenge
render json: options_for_get, status: :ok
render json: options_for_get, status: 200
else
render json: { error: t('webauthn_credentials.not_enabled') }, status: :unauthorized
render json: { error: t('webauthn_credentials.not_enabled') }, status: 401
end
end
@ -115,9 +115,7 @@ class Auth::SessionsController < Devise::SessionsController
def home_paths(resource)
paths = [about_path]
if single_user_mode? && resource.is_a?(User)
paths << short_account_path(username: resource.account)
end
paths << short_account_path(username: resource.account) if single_user_mode? && resource.is_a?(User)
paths
end

@ -0,0 +1,31 @@
# frozen_string_literal: true
class BackupsController < ApplicationController
include RoutingHelper
skip_before_action :require_functional!
before_action :authenticate_user!
before_action :set_backup
def download
case Paperclip::Attachment.default_options[:storage]
when :s3
redirect_to @backup.dump.expiring_url(10)
when :fog
if Paperclip::Attachment.default_options.dig(:fog_credentials, :openstack_temp_url_key).present?
redirect_to @backup.dump.expiring_url(Time.now.utc + 10)
else
redirect_to full_asset_url(@backup.dump.url)
end
when :filesystem
redirect_to full_asset_url(@backup.dump.url)
end
end
private
def set_backup
@backup = current_user.backups.find(params[:id])
end
end

@ -10,7 +10,8 @@ module AccountControllerConcern
included do
before_action :set_instance_presenter
before_action :set_link_headers, if: -> { request.format.nil? || request.format == :html }
after_action :set_link_headers, if: -> { request.format.nil? || request.format == :html }
end
private

@ -3,6 +3,158 @@
module CacheConcern
extend ActiveSupport::Concern
module ActiveRecordCoder
EMPTY_HASH = {}.freeze
class << self
def dump(record)
instances = InstanceTracker.new
serialized_associations = serialize_associations(record, instances)
serialized_records = instances.map { |r| serialize_record(r) }
[serialized_associations, *serialized_records]
end
def load(payload)
instances = InstanceTracker.new
serialized_associations, *serialized_records = payload
serialized_records.each { |attrs| instances.push(deserialize_record(*attrs)) }
deserialize_associations(serialized_associations, instances)
end
private
# Records without associations, or which have already been visited before,
# are serialized by their id alone.
#
# Records with associations are serialized as a two-element array including
# their id and the record's association cache.
#
def serialize_associations(record, instances)
return unless record
if (id = instances.lookup(record))
payload = id
else
payload = instances.push(record)
cached_associations = record.class.reflect_on_all_associations.select do |reflection|
record.association_cached?(reflection.name)
end
unless cached_associations.empty?
serialized_associations = cached_associations.map do |reflection|
association = record.association(reflection.name)
serialized_target = if reflection.collection?
association.target.map { |target_record| serialize_associations(target_record, instances) }
else
serialize_associations(association.target, instances)
end
[reflection.name, serialized_target]
end
payload = [payload, serialized_associations]
end
end
payload
end
def deserialize_associations(payload, instances)
return unless payload
id, associations = payload
record = instances.fetch(id)
associations&.each do |name, serialized_target|
begin
association = record.association(name)
rescue ActiveRecord::AssociationNotFoundError
raise AssociationMissingError, "undefined association: #{name}"
end
target = if association.reflection.collection?
serialized_target.map! { |serialized_record| deserialize_associations(serialized_record, instances) }
else
deserialize_associations(serialized_target, instances)
end
association.target = target
end
record
end
def serialize_record(record)
arguments = [record.class.name, attributes_for_database(record)]
arguments << true if record.new_record?
arguments
end
if Rails.gem_version >= Gem::Version.new('7.0')
def attributes_for_database(record)
attributes = record.attributes_for_database
attributes.transform_values! { |attr| attr.is_a?(::ActiveModel::Type::Binary::Data) ? attr.to_s : attr }
attributes
end
else
def attributes_for_database(record)
attributes = record.instance_variable_get(:@attributes).send(:attributes).transform_values(&:value_for_database)
attributes.transform_values! { |attr| attr.is_a?(::ActiveModel::Type::Binary::Data) ? attr.to_s : attr }
attributes
end
end
def deserialize_record(class_name, attributes_from_database, new_record = false) # rubocop:disable Style/OptionalBooleanParameter
begin
klass = Object.const_get(class_name)
rescue NameError
raise ClassMissingError, "undefined class: #{class_name}"
end
# Ideally we'd like to call `klass.instantiate`, however it doesn't allow to pass
# wether the record was persisted or not.
attributes = klass.attributes_builder.build_from_database(attributes_from_database, EMPTY_HASH)
klass.allocate.init_with_attributes(attributes, new_record)
end
end
class Error < StandardError
end
class ClassMissingError < Error
end
class AssociationMissingError < Error
end
class InstanceTracker
def initialize
@instances = []
@ids = {}.compare_by_identity
end
def map(&block)
@instances.map(&block)
end
def fetch(...)
@instances.fetch(...)
end
def push(instance)
id = @ids[instance] = @instances.size
@instances << instance
id
end
def lookup(instance)
@ids[instance]
end
end
end
def render_with_cache(**options)
raise ArgumentError, 'only JSON render calls are supported' unless options.key?(:json) || block_given?
@ -34,8 +186,13 @@ module CacheConcern
raw = raw.cache_ids.to_a if raw.is_a?(ActiveRecord::Relation)
return [] if raw.empty?
cached_keys_with_value = Rails.cache.read_multi(*raw).transform_keys(&:id)
uncached_ids = raw.map(&:id) - cached_keys_with_value.keys
cached_keys_with_value = begin
Rails.cache.read_multi(*raw).transform_keys(&:id).transform_values { |r| ActiveRecordCoder.load(r) }
rescue ActiveRecordCoder::Error
{} # The serialization format may have changed, let's pretend it's a cache miss.
end
uncached_ids = raw.map(&:id) - cached_keys_with_value.keys
klass.reload_stale_associations!(cached_keys_with_value.values) if klass.respond_to?(:reload_stale_associations!)
@ -43,7 +200,7 @@ module CacheConcern
uncached = klass.where(id: uncached_ids).with_includes.index_by(&:id)
uncached.each_value do |item|
Rails.cache.write(item, item)
Rails.cache.write(item, ActiveRecordCoder.dump(item))
end
end

@ -6,13 +6,11 @@ module RateLimitHeaders
class_methods do
def override_rate_limit_headers(method_name, options = {})
around_action(only: method_name, if: :current_account) do |_controller, block|
begin
block.call
ensure
rate_limiter = RateLimiter.new(current_account, options)
rate_limit_headers = rate_limiter.to_headers
response.headers.merge!(rate_limit_headers) unless response.headers['X-RateLimit-Remaining'].present? && rate_limit_headers['X-RateLimit-Remaining'].to_i > response.headers['X-RateLimit-Remaining'].to_i
end
block.call
ensure
rate_limiter = RateLimiter.new(current_account, options)
rate_limit_headers = rate_limiter.to_headers
response.headers.merge!(rate_limit_headers) unless response.headers['X-RateLimit-Remaining'].present? && rate_limit_headers['X-RateLimit-Remaining'].to_i > response.headers['X-RateLimit-Remaining'].to_i
end
end
end
@ -67,6 +65,6 @@ module RateLimitHeaders
end
def reset_period_offset
api_throttle_data[:period] - request_time.to_i % api_throttle_data[:period]
api_throttle_data[:period] - (request_time.to_i % api_throttle_data[:period])
end
end

@ -13,6 +13,7 @@ module SessionTrackingConcern
def set_session_activity
return unless session_needs_update?
current_session.touch
end

@ -138,7 +138,7 @@ module SignatureVerification
end
def signed_headers
signature_params.fetch('headers', signature_algorithm == 'hs2019' ? '(created)' : 'date').downcase.split(' ')
signature_params.fetch('headers', signature_algorithm == 'hs2019' ? '(created)' : 'date').downcase.split
end
def verify_signature_strength!
@ -165,6 +165,7 @@ module SignatureVerification
end
raise SignatureVerificationError, "Invalid Digest value. The provided Digest value is not a SHA-256 digest. Given digest: #{sha256[1]}" if digest_size != 32
raise SignatureVerificationError, "Invalid Digest value. Computed SHA-256 digest: #{body_digest}; given: #{sha256[1]}"
end

@ -57,10 +57,10 @@ module TwoFactorAuthenticationConcern
if valid_webauthn_credential?(user, webauthn_credential)
on_authentication_success(user, :webauthn)
render json: { redirect_path: after_sign_in_path_for(user) }, status: :ok
render json: { redirect_path: after_sign_in_path_for(user) }, status: 200
else
on_authentication_failure(user, :webauthn, :invalid_credential)
render json: { error: t('webauthn_credentials.invalid_credential') }, status: :unprocessable_entity
render json: { error: t('webauthn_credentials.invalid_credential') }, status: 422
end
end
@ -81,13 +81,11 @@ module TwoFactorAuthenticationConcern
@body_classes = 'lighter'
@webauthn_enabled = user.webauthn_enabled?
@scheme_type = begin
if user.webauthn_enabled? && user_params[:otp_attempt].blank?
'webauthn'
else
'totp'
end
end
@scheme_type = if user.webauthn_enabled? && user_params[:otp_attempt].blank?
'webauthn'
else
'totp'
end
set_locale { render :two_factor }
end

@ -43,9 +43,7 @@ class Filters::StatusesController < ApplicationController
end
def action_from_button
if params[:remove]
'remove'
end
'remove' if params[:remove]
end
def set_body_classes

@ -33,7 +33,7 @@ class MediaController < ApplicationController
scope = MediaAttachment.local.attached
# If id is 19 characters long, it's a shortcode, otherwise it's an identifier
@media_attachment = id.size == 19 ? scope.find_by!(shortcode: id) : scope.find_by!(id: id)
@media_attachment = id.size == 19 ? scope.find_by!(shortcode: id) : scope.find(id)
end
def verify_permitted_status!

@ -23,7 +23,7 @@ class MediaProxyController < ApplicationController
redownload! if @media_attachment.needs_redownload? && !reject_media?
end
redirect_to full_asset_url(@media_attachment.file.url(version))
redirect_to full_asset_url(@media_attachment.file.url(version)), allow_other_host: true
end
private

@ -20,6 +20,8 @@ class RelationshipsController < ApplicationController
@form.save
rescue ActionController::ParameterMissing
# Do nothing
rescue Mastodon::NotPermittedError, ActiveRecord::RecordNotFound
flash[:alert] = I18n.t('relationships.follow_failure') if action_from_button == 'follow'
ensure
redirect_to relationships_path(filter_params)
end
@ -61,8 +63,8 @@ class RelationshipsController < ApplicationController
'unfollow'
elsif params[:remove_from_followers]
'remove_from_followers'
elsif params[:block_domains]
'block_domains'
elsif params[:block_domains] || params[:remove_domains_from_followers]
'remove_domains_from_followers'
end
end

@ -12,27 +12,15 @@ class Settings::FlavoursController < Settings::BaseController
end
def show
unless Themes.instance.flavours.include?(params[:flavour]) || (params[:flavour] == current_flavour)
redirect_to action: 'show', flavour: current_flavour
end
redirect_to action: 'show', flavour: current_flavour unless Themes.instance.flavours.include?(params[:flavour]) || (params[:flavour] == current_flavour)
@listing = Themes.instance.flavours
@selected = params[:flavour]
end
def update
user_settings.update(user_settings_params)
current_user.settings.update(flavour: params.require(:flavour), skin: params.dig(:user, :setting_skin))
current_user.save
redirect_to action: 'show', flavour: params[:flavour]
end
private
def user_settings
UserSettingsDecorator.new(current_user)
end
def user_settings_params
{ setting_flavour: params.require(:flavour),
setting_skin: params.dig(:user, :setting_skin) }.with_indifferent_access
end
end

@ -4,8 +4,6 @@ class Settings::PreferencesController < Settings::BaseController
def show; end
def update
user_settings.update(user_settings_params.to_h)
if current_user.update(user_params)
I18n.locale = current_user.locale
redirect_to after_update_redirect_path, notice: I18n.t('generic.changes_saved_msg')
@ -20,46 +18,7 @@ class Settings::PreferencesController < Settings::BaseController
settings_preferences_path
end
def user_settings
UserSettingsDecorator.new(current_user)
end
def user_params
params.require(:user).permit(
:locale,
chosen_languages: []
)
end
def user_settings_params
params.require(:user).permit(
:setting_default_privacy,
:setting_default_sensitive,
:setting_default_language,
:setting_unfollow_modal,
:setting_boost_modal,
:setting_favourite_modal,
:setting_delete_modal,
:setting_auto_play_gif,
:setting_display_media,
:setting_expand_spoilers,
:setting_reduce_motion,
:setting_disable_swiping,
:setting_system_font_ui,
:setting_system_emoji_font,
:setting_noindex,
:setting_hide_followers_count,
:setting_aggregate_reblogs,
:setting_show_application,
:setting_advanced_layout,
:setting_default_content_type,
:setting_use_blurhash,
:setting_use_pending_items,
:setting_trends,
:setting_crop_images,
:setting_always_send_emails,
notification_emails: %i(follow follow_request reblog favourite mention report pending_account trending_tag trending_link trending_status appeal),
interactions: %i(must_be_follower must_be_following must_be_following_dm)
)
params.require(:user).permit(:locale, chosen_languages: [], settings_attributes: UserSettings.keys)
end
end

@ -22,18 +22,9 @@ module Settings
private
def confirmation_params
params.require(:form_two_factor_confirmation).permit(:otp_attempt)
end
def verify_otp_not_enabled
redirect_to settings_two_factor_authentication_methods_path if current_user.otp_enabled?
end
def acceptable_code?
current_user.validate_and_consume_otp!(confirmation_params[:otp_attempt]) ||
current_user.invalidate_otp_backup_code!(confirmation_params[:otp_attempt])
end
end
end
end

@ -27,7 +27,7 @@ module Settings
session[:webauthn_challenge] = options_for_create.challenge
render json: options_for_create, status: :ok
render json: options_for_create, status: 200
end
def create
@ -52,7 +52,7 @@ module Settings
end
else
flash[:error] = I18n.t('webauthn_credentials.create.error')
status = :internal_server_error
status = :unprocessable_entity
end
else
flash[:error] = t('webauthn_credentials.create.error')

@ -9,11 +9,12 @@ class StatusesController < ApplicationController
before_action :require_account_signature!, only: [:show, :activity], if: -> { request.format == :json && authorized_fetch_mode? }
before_action :set_status
before_action :set_instance_presenter
before_action :set_link_headers
before_action :redirect_to_original, only: :show
before_action :set_cache_headers
before_action :set_body_classes, only: :embed
after_action :set_link_headers
skip_around_action :set_locale, if: -> { request.format == :json }
skip_before_action :require_functional!, only: [:show, :embed], unless: :whitelist_mode?
@ -71,6 +72,6 @@ class StatusesController < ApplicationController
end
def redirect_to_original
redirect_to ActivityPub::TagManager.instance.url_for(@status.reblog) if @status.reblog?
redirect_to(ActivityPub::TagManager.instance.url_for(@status.reblog), allow_other_host: true) if @status.reblog?
end
end

@ -58,7 +58,7 @@ class TagsController < ApplicationController
def collection_presenter
ActivityPub::CollectionPresenter.new(
id: tag_url(@tag),
type: :ordered,
type: :ordered
)
end
end

@ -28,7 +28,7 @@ module AccountsHelper
end
def hide_followers_count?(account)
Setting.hide_followers_count || account.user&.setting_hide_followers_count
Setting.hide_followers_count || account.user&.settings&.[]('hide_followers_count')
end
def account_description(account)

@ -1,11 +0,0 @@
# frozen_string_literal: true
module Admin::AnnouncementsHelper
def time_range(announcement)
if announcement.all_day?
safe_join([l(announcement.starts_at.to_date), ' - ', l(announcement.ends_at.to_date)])
else
safe_join([l(announcement.starts_at), ' - ', l(announcement.ends_at)])
end
end
end

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save