Commit Graph

4349 Commits

Author SHA1 Message Date
Tom Moor
f1bd4a5b31 Merge branch '3991-add-explicit-timeouts-to-requests' 2022-08-22 09:21:22 +02:00
Tom Moor
72b0e78788 fix: Validate uuid on attachments.create endpoint 2022-08-20 23:46:01 +02:00
Tom Moor
8302840ab5 feat: Add timeout to incoming requests 2022-08-19 08:14:11 +02:00
Tom Moor
f32f07cdcc chore: Refactor user activation to command 2022-08-18 11:24:27 +02:00
Tom Moor
f620a9d34c fix: Cannot start without --services argument, regressed in 41d7cc26b5
closes #3984
2022-08-18 09:48:28 +02:00
Tom Moor
7113b5f604 fix: Restore user deletion through API, increase rate limit 2022-08-17 22:40:00 +02:00
Tom Moor
41d7cc26b5 chore: Adds name to Redis connections for debugging (#3982)
* chore: Adds name to Redis connections for debugging, minor associated refactoring

* Upgrade bull, ioredis

* Add pid to redis connection name in development
2022-08-17 12:55:57 -07:00
Tom Moor
e57941732a fix: emoji column no longer filled in db, simplified state length validation 2022-08-16 22:05:10 +02:00
Tom Moor
a738b51d87 chore: Add additional logging for unknown request errors 2022-08-16 19:49:15 +02:00
Tom Moor
85dab03820 docs 2022-08-16 19:43:50 +02:00
Tom Moor
ed8176ca7d fix: Limit ws payload size 2022-08-16 10:27:55 +02:00
Tom Moor
cfa7ecd7f8 fix: Add missing validation to document state 2022-08-16 09:35:31 +02:00
github-actions[bot]
44a4aee5cf chore: Auto Compress Images (#3977)
Co-authored-by: apoorv-mishra <apoorv-mishra@users.noreply.github.com>
2022-08-16 00:10:52 -07:00
Jonathan Harrrington
7ead17a8e0 Add support for Grist embeds. (#3914)
* Add support for Grist embeds.

* Change Grist integration to only support SaaS

* Update Regex

* Update shared/editor/embeds/index.tsx

Co-authored-by: Apoorv Mishra <apoorvmishra101092@gmail.com>

* Change Grist embed to use function based API

* Convert standard URL into embed url

* Update shared/editor/embeds/Grist.tsx

Co-authored-by: Apoorv Mishra <apoorvmishra101092@gmail.com>

* Update shared/editor/embeds/Grist.tsx

Co-authored-by: Apoorv Mishra <apoorvmishra101092@gmail.com>

* Update shared/editor/embeds/Grist.tsx

Co-authored-by: Apoorv Mishra <apoorvmishra101092@gmail.com>

* Lint and test updates

Co-authored-by: Apoorv Mishra <apoorvmishra101092@gmail.com>
Co-authored-by: Tom Moor <tom.moor@gmail.com>
2022-08-16 09:17:20 +05:30
Apoorv Mishra
7a758f84a0 chore: refactor server test setup (#3976)
* chore: refactor server test setup

* Close dangling redis connections instead of mocking rate limiter
  specific modules
* Segregate pre and post env test setup

* fix: remove mock file
2022-08-16 09:16:57 +05:30
Tom Moor
93bb9d067d fix: H1 and title should be different sizes, closes #3975 2022-08-15 23:02:35 +02:00
Tom Moor
9f3266abaf Remove headings 4 and below from TOC, see:
https://github.com/outline/outline/discussions/3973
2022-08-15 22:46:49 +02:00
Tom Moor
4d0473c22c Reference email image by cid for self hosted instances (#3957) 2022-08-14 08:50:49 -07:00
Tom Moor
d8b4814aa9 perf: Suppress Mermaid diagram rendering when hidden (#3963) 2022-08-14 08:50:37 -07:00
Tom Moor
a326e0ee88 chore: Rate limiter audit (#3965)
* chore: Rate limiter audit api/users

* Make requests required

* api/collections

* Remove checkRateLimit on FileOperation (now done at route level through rate limiter)

* auth rate limit

* Add metric logging when rate limit exceeded

* Refactor to shared configs

* test
2022-08-14 08:04:04 -07:00
Tom Moor
9338328a82 fix: Add expiry to socket<->user mapping in Redis 2022-08-13 22:26:13 +02:00
Tom Moor
31931fc80c test: Remove --detectLeaks as this expiremental flag is good – but flakey, tests fail in CI that do not locally 2022-08-12 15:37:08 +02:00
Tom Moor
7deda03000 test: Fix test memory leakage by mocking RateLimiter 2022-08-12 15:14:58 +02:00
Nan Yu
990de127e3 feat: add session switching to the root action menu (#3925)
* feat: add session switching to the root action menu

* minor fixes

* stylistic consistency

* capitalize account section

* minor fix
2022-08-12 05:11:22 -07:00
Apoorv Mishra
0c51bfb899 perf: reduce memory usage upon running server tests (#3949)
* perf: reduce memory usage upon running server tests

* perf: plug leaks in server/routes

* perf: plug leaks in server/scripts

* perf: plug leaks in server/policies

* perf: plug leaks in server/models

* perf: plug leaks in server/middlewares

* perf: plug leaks in server/commands

* fix: missing await on db.flush

* perf: plug leaks in server/queues

* chore: remove unused legacy funcs

* fix: await on db.flush

* perf: await on GC to run in between tests

* fix: remove db refs

* fix: revert embeds

* perf: plug leaks in shared/i18n
2022-08-11 21:39:17 +05:30
akp
8e1f42a9cb Add optional export notifications (#3935)
* Add `emails.export_completed` notification to settings menu

Signed-off-by: AKP <tom@tdpain.net>

* Don't send email when export_completed notifications are disabled

Signed-off-by: AKP <tom@tdpain.net>

* Automatically subscribe new users to `export_completed` notifications

Signed-off-by: AKP <tom@tdpain.net>

* Alter secondary text on export page to mention optional notifications

Signed-off-by: AKP <tom@tdpain.net>

* Alter toast text on collection export for optional notifications

Signed-off-by: AKP <tom@tdpain.net>

* Only subscribe new admins to export notifs

Signed-off-by: AKP <tom@tdpain.net>

* Move `export_completed` notification decision into `beforeSend`

Signed-off-by: AKP <tom@tdpain.net>

* Update server/emails/templates/ExportFailureEmail.tsx

Co-authored-by: Tom Moor <tom.moor@gmail.com>

* Update server/emails/templates/ExportSuccessEmail.tsx

Co-authored-by: Tom Moor <tom.moor@gmail.com>

Signed-off-by: AKP <tom@tdpain.net>
Co-authored-by: Tom Moor <tom.moor@gmail.com>
2022-08-11 07:31:35 -07:00
Tom Moor
1adcce6b5d fix: Upgrade markdown-it to fix text collapse bug (#3953)
* fix: Upgrade markdown-it to fix text collapse bug

* tsc. Need to overwrite the types for now until all Prosemirror modules are updated, they have recently been converted to Typescript and the types conflict
2022-08-11 06:31:52 -07:00
Translate-O-Tron
a5d611d544 New Crowdin updates (#3795) 2022-08-11 05:46:21 -07:00
Tom Moor
1d242d44b1 chore: Add eslint rule for object shorthand (#3955) 2022-08-11 05:18:14 -07:00
Apoorv Mishra
7eaa8eb961 feat: Put request rate limit at application server (#3857)
* feat: Put request rate limit at application server

This PR contains implementation for a blanket rate limiter at
application server level. Currently the allowed throughput is set high
only to be changed later as per the actual data gathered.

* Simplify implementation

1. Remove shutdown handler to purge rate limiter keys
2. Have separate keys for default and custom(route-based) rate limiters
3. Do not kill default rate limiter because it is not needed anymore due
   to (2) above

* Set 60s as default for rate limiting window

* Fix env types
2022-08-11 15:40:30 +05:30
Tom Moor
593cf73118 test: Update jest configuration (#3951)
* Split shared tests

* Centralize and parallelize jest config

* ci
2022-08-10 13:26:36 -07:00
Tom Moor
e5c5e8907a fix: Disallow data: URI's for images 2022-08-09 16:31:09 +02:00
dependabot[bot]
5640ec30cc chore(deps): bump compressorjs from 1.0.7 to 1.1.1 (#3943)
Bumps [compressorjs](https://github.com/fengyuanchen/compressorjs) from 1.0.7 to 1.1.1.
- [Release notes](https://github.com/fengyuanchen/compressorjs/releases)
- [Changelog](https://github.com/fengyuanchen/compressorjs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/fengyuanchen/compressorjs/compare/v1.0.7...v1.1.1)

---
updated-dependencies:
- dependency-name: compressorjs
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-08 09:13:03 -07:00
dependabot[bot]
da67486f2f chore(deps): bump aws-sdk from 2.1044.0 to 2.1189.0 (#3942)
Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.1044.0 to 2.1189.0.
- [Release notes](https://github.com/aws/aws-sdk-js/releases)
- [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-js/compare/v2.1044.0...v2.1189.0)

---
updated-dependencies:
- dependency-name: aws-sdk
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-08 09:11:55 -07:00
Tom Moor
8c39487c80 Move various document menu actions to action definitions 2022-08-08 17:31:53 +02:00
dependabot[bot]
3ab9d7492e chore(deps): bump react-merge-refs from 1.1.0 to 2.0.1 (#3903)
* chore(deps): bump react-merge-refs from 1.1.0 to 2.0.1

Bumps [react-merge-refs](https://github.com/gregberge/react-merge-refs) from 1.1.0 to 2.0.1.
- [Release notes](https://github.com/gregberge/react-merge-refs/releases)
- [Changelog](https://github.com/gregberge/react-merge-refs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/gregberge/react-merge-refs/compare/v1.1.0...v2.0.1)

---
updated-dependencies:
- dependency-name: react-merge-refs
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* tsc

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tom Moor <tom.moor@gmail.com>
2022-08-08 15:04:18 +01:00
dependabot[bot]
6a5d6ee3db chore(deps): bump oy-vey from 0.10.0 to 0.11.2 (#3902)
* chore(deps): bump oy-vey from 0.10.0 to 0.11.2

Bumps [oy-vey](https://github.com/oysterbooks/oy) from 0.10.0 to 0.11.2.
- [Release notes](https://github.com/oysterbooks/oy/releases)
- [Changelog](https://github.com/revivek/oy/blob/master/CHANGELOG.md)
- [Commits](https://github.com/oysterbooks/oy/compare/0.10.0...0.11.2)

---
updated-dependencies:
- dependency-name: oy-vey
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* tsc

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tom Moor <tom.moor@gmail.com>
2022-08-08 07:02:41 -07:00
Tom Moor
57f9871c22 Add NODE_ENV=production to env sample 2022-08-08 05:52:03 -07:00
Tom Moor
dca491fc28 test: Fix frontend test failures from upgrading Jest to v28 2022-08-08 13:31:34 +02:00
Tom Moor
e97cc61e2f test: Mock bull, fix setInterval capturing memory in tests
Towards #3939
2022-08-08 13:15:06 +02:00
Tom Moor
ba385e1507 chore: Bump jest 2022-08-08 12:40:17 +02:00
Tom Moor
71c9fcf59b test: Avoid creation of new server/app instance for each route test 2022-08-08 12:06:54 +02:00
Tom Moor
b45e6c504f fix: Prevent webhook delivery for deleted teams 2022-08-08 11:15:04 +02:00
Tom Moor
1b00d51c74 fix: Check WebhookSubscription is not disabled before delivery attempt 2022-08-08 11:10:10 +02:00
Tom Moor
7923a7e071 Enforce user invites/request on server 2022-08-08 11:02:37 +02:00
Tom Moor
b37a848914 Add limit of 10 webhooks/team 2022-08-08 10:58:47 +02:00
github-actions[bot]
dca9bc1598 chore: Compressed inefficient images automatically (#3933)
Co-authored-by: apoorv-mishra <apoorv-mishra@users.noreply.github.com>
2022-08-07 13:10:08 -07:00
Apoorv Mishra
982ab2b48e feat(editor): support google form embeds (#3930)
Fixes #3129 and #3923
2022-08-07 12:41:30 +05:30
Nan Yu
74d9409cc3 fix: refactor auth flow to explicitly pass in a host (#3909)
* fix: refactor auth flow to explicitly pass in a host

* add new error handler to all SSO providers

* refactor passport error into middleware
2022-08-04 02:00:52 -07:00
Apoorv Mishra
0a6cfe5a6a feat: Choose random color on collection creation (#3912)
Choose a random color from a shared color palette between backend
and frontend during collection creation.
2022-08-04 01:48:19 -07:00