mirror of
https://git.bsd.gay/fef/nyastodon.git
synced 2024-12-24 18:13:42 +01:00
Merge branch 'main' into glitch-soc/merge-upstream
Conflicts: - `.prettierignore`: Upstream added a line at the end of the file, while glitch-soc had its own extra lines. Took upstream's change. - `CONTRIBUTING.md`: We have our custom CONTRIBUTING.md quoting upstream. Upstream made changes. Ported upstream changes. - `app/controllers/application_controller.rb`: Upstream made code style changes in a method that is entirely replaced in glitch-soc. Ignored the change. - `app/models/account.rb`: Code style changes textually close to glitch-soc-specific changes. Ported upstream changes. - `lib/sanitize_ext/sanitize_config.rb`: Upstream code style changes. Ignored them.
This commit is contained in:
commit
4ed09276d5
946 changed files with 4147 additions and 3072 deletions
|
@ -43,7 +43,7 @@ module.exports = {
|
|||
version: 'detect',
|
||||
},
|
||||
'import/extensions': [
|
||||
'.js',
|
||||
'.js', '.jsx',
|
||||
],
|
||||
'import/ignore': [
|
||||
'node_modules',
|
||||
|
@ -52,6 +52,7 @@ module.exports = {
|
|||
'import/resolver': {
|
||||
node: {
|
||||
paths: ['app/javascript'],
|
||||
extensions: ['.js', '.jsx'],
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -111,6 +112,7 @@ module.exports = {
|
|||
semi: 'error',
|
||||
'valid-typeof': 'error',
|
||||
|
||||
'react/jsx-filename-extension': ['error', { 'allow': 'as-needed' }],
|
||||
'react/jsx-boolean-value': 'error',
|
||||
'react/jsx-closing-bracket-location': ['error', 'line-aligned'],
|
||||
'react/jsx-curly-spacing': 'error',
|
||||
|
@ -185,6 +187,7 @@ module.exports = {
|
|||
'always',
|
||||
{
|
||||
js: 'never',
|
||||
jsx: 'never',
|
||||
},
|
||||
],
|
||||
'import/newline-after-import': 'error',
|
||||
|
|
2
.github/workflows/lint-js.yml
vendored
2
.github/workflows/lint-js.yml
vendored
|
@ -10,6 +10,7 @@ on:
|
|||
- '.prettier*'
|
||||
- '.eslint*'
|
||||
- '**/*.js'
|
||||
- '**/*.jsx'
|
||||
- '.github/workflows/lint-js.yml'
|
||||
|
||||
pull_request:
|
||||
|
@ -20,6 +21,7 @@ on:
|
|||
- '.prettier*'
|
||||
- '.eslint*'
|
||||
- '**/*.js'
|
||||
- '**/*.jsx'
|
||||
- '.github/workflows/lint-js.yml'
|
||||
|
||||
jobs:
|
||||
|
|
40
.github/workflows/lint-md.yml
vendored
Normal file
40
.github/workflows/lint-md.yml
vendored
Normal file
|
@ -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"
|
6
.github/workflows/rebase-needed.yml
vendored
6
.github/workflows/rebase-needed.yml
vendored
|
@ -5,6 +5,9 @@ on:
|
|||
pull_request_target:
|
||||
types: [synchronize]
|
||||
|
||||
permissions:
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
label-rebase-needed:
|
||||
runs-on: ubuntu-latest
|
||||
|
@ -19,4 +22,7 @@ jobs:
|
|||
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
|
||||
|
|
2
.github/workflows/test-js.yml
vendored
2
.github/workflows/test-js.yml
vendored
|
@ -8,6 +8,7 @@ on:
|
|||
- 'yarn.lock'
|
||||
- '.nvmrc'
|
||||
- '**/*.js'
|
||||
- '**/*.jsx'
|
||||
- '**/*.snap'
|
||||
- '.github/workflows/test-js.yml'
|
||||
|
||||
|
@ -17,6 +18,7 @@ on:
|
|||
- 'yarn.lock'
|
||||
- '.nvmrc'
|
||||
- '**/*.js'
|
||||
- '**/*.jsx'
|
||||
- '**/*.snap'
|
||||
- '.github/workflows/test-js.yml'
|
||||
|
||||
|
|
|
@ -69,13 +69,14 @@ app/javascript/styles/mastodon/reset.scss
|
|||
|
||||
# Ignore Javascript pending https://github.com/mastodon/mastodon/pull/23631
|
||||
*.js
|
||||
|
||||
# Ignore Markdownlint pending https://github.com/mastodon/mastodon/pull/21972
|
||||
*.md
|
||||
*.jsx
|
||||
|
||||
# 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
|
||||
|
||||
|
|
12
.rubocop.yml
12
.rubocop.yml
|
@ -88,12 +88,21 @@ Metrics/ModuleLength:
|
|||
Metrics/PerceivedComplexity:
|
||||
Max: 16 # RuboCop default 8
|
||||
|
||||
Rails/HttpStatus:
|
||||
EnforcedStyle: numeric
|
||||
|
||||
Rails/Exit:
|
||||
Exclude:
|
||||
- 'lib/mastodon/*_cli.rb'
|
||||
- 'lib/mastodon/cli_helper.rb'
|
||||
- 'lib/cli.rb'
|
||||
|
||||
RSpec/NotToNot:
|
||||
EnforcedStyle: to_not
|
||||
|
||||
RSpec/Rails/HttpStatus:
|
||||
EnforcedStyle: numeric
|
||||
|
||||
Style/HashSyntax:
|
||||
EnforcedStyle: ruby19_no_mixed_keys
|
||||
|
||||
|
@ -106,6 +115,9 @@ Style/PercentLiteralDelimiters:
|
|||
'%i': '()'
|
||||
'%w': '()'
|
||||
|
||||
Style/RescueStandardError:
|
||||
EnforcedStyle: implicit
|
||||
|
||||
Style/TrailingCommaInArrayLiteral:
|
||||
EnforcedStyleForMultiline: 'comma'
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
52
CHANGELOG.md
52
CHANGELOG.md
|
@ -1,5 +1,4 @@
|
|||
Changelog
|
||||
=========
|
||||
# Changelog
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
|
@ -219,6 +218,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 +226,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 +430,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 +478,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 +531,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 +575,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 +775,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 +790,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 +805,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 +823,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 +873,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 +893,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))
|
||||
|
@ -1027,6 +1039,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 +1216,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 +1243,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 +1273,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 +1409,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 +1427,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 +1435,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))
|
||||
|
@ -1485,6 +1503,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 +1577,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 +1604,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 +1775,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 +1809,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 +2006,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 +2066,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 +2081,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 +2107,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 +2162,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 +2174,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 +2197,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 +2210,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 +2250,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 +2334,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 +2349,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 +2367,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 +2409,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 +2424,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 +2554,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 +2564,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 +2590,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 +2625,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 +2737,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
|
||||
|
||||
|
|
|
@ -37,9 +37,7 @@ You should also try to follow the guidelines set out in the original `CONTRIBUTI
|
|||
|
||||
<blockquote>
|
||||
|
||||
CONTRIBUTING
|
||||
=======
|
||||
Contributing
|
||||
# Contributing
|
||||
|
||||
Thank you for considering contributing to Mastodon 🐘
|
||||
|
||||
|
@ -69,7 +67,7 @@ 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 |
|
||||
|
||||
It is not always possible to phrase every change in such a manner, but it is desired.
|
||||
|
|
1
Capfile
1
Capfile
|
@ -1,4 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'capistrano/setup'
|
||||
require 'capistrano/deploy'
|
||||
require 'capistrano/scm/git'
|
||||
|
|
2
Gemfile
2
Gemfile
|
@ -30,7 +30,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
|
||||
|
|
18
Gemfile.lock
18
Gemfile.lock
|
@ -125,7 +125,7 @@ GEM
|
|||
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)
|
||||
|
@ -156,7 +156,7 @@ GEM
|
|||
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)
|
||||
|
@ -205,7 +205,7 @@ GEM
|
|||
addressable
|
||||
date (3.3.3)
|
||||
debug_inspector (1.0.0)
|
||||
devise (4.8.1)
|
||||
devise (4.9.0)
|
||||
bcrypt (~> 3.0)
|
||||
orm_adapter (~> 0.1)
|
||||
railties (>= 4.1.0)
|
||||
|
@ -432,7 +432,7 @@ 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
|
||||
|
@ -577,9 +577,9 @@ GEM
|
|||
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)
|
||||
|
@ -684,7 +684,7 @@ 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)
|
||||
|
@ -799,7 +799,7 @@ DEPENDENCIES
|
|||
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)
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@ module SessionTrackingConcern
|
|||
|
||||
def set_session_activity
|
||||
return unless session_needs_update?
|
||||
|
||||
current_session.touch
|
||||
end
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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!
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -105,6 +105,7 @@ module ApplicationHelper
|
|||
|
||||
def can?(action, record)
|
||||
return false if record.nil?
|
||||
|
||||
policy(record).public_send("#{action}?")
|
||||
end
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# rubocop:disable Metrics/ModuleLength, Style/WordArray
|
||||
|
||||
module LanguagesHelper
|
||||
|
|
|
@ -160,6 +160,7 @@ class Status extends ImmutablePureComponent {
|
|||
|
||||
if (e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
}
|
||||
|
||||
this._openProfile(proper);
|
||||
|
@ -510,8 +511,8 @@ class Status extends ImmutablePureComponent {
|
|||
{prepend}
|
||||
|
||||
<div className={classNames('status', `status-${status.get('visibility')}`, { 'status-reply': !!status.get('in_reply_to_id'), muted: this.props.muted })} data-id={status.get('id')}>
|
||||
<div className='status__info'>
|
||||
<a onClick={this.handleClick} href={`/@${status.getIn(['account', 'acct'])}/${status.get('id')}`} className='status__relative-time' target='_blank' rel='noopener noreferrer'>
|
||||
<div onClick={this.handleClick} className='status__info'>
|
||||
<a href={`/@${status.getIn(['account', 'acct'])}/${status.get('id')}`} className='status__relative-time' target='_blank' rel='noopener noreferrer'>
|
||||
<span className='status__visibility-icon'><Icon id={visibilityIcon.icon} title={visibilityIcon.text} /></span>
|
||||
<RelativeTimestamp timestamp={status.get('created_at')} />{status.get('edited_at') && <abbr title={intl.formatMessage(messages.edited, { date: intl.formatDate(status.get('edited_at'), { hour12: false, year: 'numeric', month: 'short', day: '2-digit', hour: '2-digit', minute: '2-digit' }) })}> *</abbr>}
|
||||
</a>
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue