Commit Graph
3436 Commits
Author SHA1 Message Date
Tom Moor fae03e0dd1 fix: Match loopback redirect URIs on any port
Native apps such as Claude Code register http://localhost/callback and
then listen on a free port, so an exact match rejected them. Loopback
redirect URIs now match on any port (RFC 8252 section 7.3); the scheme,
host and path must still match, and other URIs still match exactly.
2026-10-11 22:22:34 -04:00
Tom Moor 85ce837357 feat: Copy DCR and CIMD client logos to file storage in the background
logo_uri was rendered directly on the consent screen, which lets the logo
host track users and change the image at any time (draft -02 sections 8.8
and 9.2). A background task now fetches the logo with the strict fetch
rules, accepts only PNG, JPEG, GIF and WebP by their leading bytes, and
stores it content addressed in the public bucket. Requests never wait for
the upload.
2026-10-11 22:14:53 -04:00
Tom Moor 1834a9cac8 fix: Respect no-cache, no-store and Age for client metadata documents
no-store and no-cache now expire the cached document at once, so it is
fetched again before the next authorization. Freshness from max-age or
Expires (measured from Date) is reduced by Age before clamping (draft -02
section 5.2).
2026-10-11 22:14:53 -04:00
Tom Moor 58988c30a8 fix: Reject client metadata documents with private key material
A jwks key with private or symmetric members (d, p, q, dp, dq, qi, oth,
k) makes the document invalid, so it is not cached (draft -02 section 4.1).
Public keys are still ignored.
2026-10-11 22:14:52 -04:00
Tom Moor 9e493c71da fix: Accept a root path in client metadata document URLs
Draft -02 section 3 marks a root path as NOT RECOMMENDED, not invalid, so
https://example.com/ is a valid client_id. A URL with no path is still
rejected.
2026-10-11 22:14:52 -04:00
Tom Moor c27c5cedc8 fix: Reject empty userinfo in client metadata document URLs
https://@host and https://:@host have a userinfo component that the URL
parser drops, so check the raw authority (draft -02 section 3).
2026-10-11 22:14:52 -04:00
Tom Moor 6c5d65b961 fix: Block all special-use addresses when fetching client metadata documents
ALLOWED_PRIVATE_IP_ADDRESSES no longer applies to client ID metadata
document requests (draft -02 section 8.6). The fetch wrapper takes an
allowIPAddressList option to override the environment list.
2026-10-11 22:14:52 -04:00
Tom Moor 7d753c23cd revert: Remove pending authorization code check from OAuth client cleanup 2026-10-11 22:14:52 -04:00
Tom Moor 0a5d03cc62 refactor: Simplify client ID metadata document handling
- Gate metadata document fetches on the MCP preference inside the helper
- Add isMCPClient getter and a shared client ID prefix constant
- Enforce the team/metadata document CHECK in both directions
- Index oauthClientId on OAuth token and code tables
- Reuse parseDomain, clamp and time helpers
2026-10-11 22:14:52 -04:00
Tom Moor 2a49007081 fix: Keep OAuth clients with pending authorization codes during cleanup 2026-10-11 22:14:52 -04:00
Tom Moor 54798ee9c7 fix: Address review findings for client ID metadata documents
- Only count unexpired tokens when cleaning up metadata document clients
- Reject backslashes, whitespace and trailing host dots in client_id URLs
- Strip trailing dots before installation host comparisons
- Type clientSecret as nullable
2026-10-11 22:14:51 -04:00
Tom Moor 4ff5165578 feat: Support OAuth Client ID Metadata Documents for MCP clients
MCP clients can send an https URL as their client_id. The server fetches
the metadata document at that URL and caches one team-less client row per
URL, so MCP works on the root domain without dynamic registration.

Closes #14010
2026-10-11 22:14:51 -04:00
Tom Moor 27f7bda660 chore: Upgrade styled-components from v5 to v6 (#14047)
* chore: Upgrade styled-components to v6

* fix: Keep pseudo-selectors attached to their parent under stylis 4
2026-10-11 21:46:38 -04:00
Tom Moor a2ab9ef731 chore: Replace socket.io-redis and crypto-js with maintained packages (#14045) 2026-10-11 19:15:11 -04:00
Tom Moor 0f856db5bd chore: Replace koa-send with @koa/send (#14044)
* chore: Replace koa-send with @koa/send

* test: Exercise send traversal protection through public asset routes
2026-10-11 19:10:08 -04:00
Tom Moor 086bd9e9e4 chore: Replace deprecated koa-router with @koa/router v15 (#14042)
* chore: Replace deprecated koa-router with @koa/router v15

* fix: Run optional authentication on all auth provider routes
2026-10-11 16:47:26 -04:00
Tom Moor ef6e51401b perf: Reduce main-thread cost of opening a document from the sidebar (#14033)
* perf: Read active models lazily in ActionContextProvider

The root provider read the active document and models during render, so
every navigation rebuilt the context and re-rendered all consumers. These
values are now getters, and overrides are merged without evaluating them.

* perf: Skip urlId scan in Store.get for UUIDs

When an id was not loaded, get() searched every item by urlId, so each
sidebar row observed the whole store. A UUID cannot end with a urlId, so
the search is skipped for UUIDs.

* perf: Stop sidebar rows re-rendering on navigation

- Track expanded nodes in an observable map, as ObservableSet.has tracks
  the whole set.
- Do not rebuild the document tree rows when the active document changes.
- Auto-expand the active path in a reaction instead of reading the active
  document during render.
- Compute active state per row, and keep row props stable.

* perf: Add useLocationSelector for persistent components

useLocation re-renders on every navigation. The new hook re-renders only
when the selected value changes, and is used where components stay mounted
across navigation. AuthenticatedLayout now keeps its portal element in
state, as it no longer re-renders after mount.

* chore: Send Document-Policy js-profiling header in development

* docs: Add render performance guidance to AGENTS.md

* fix: Check document or collection star exclusively for active state

* fix: Read location from each action context provider's own history

Nested providers inherited the root location getter, so menus inside a
split view pane read the browser route instead of the pane's route.

* fix: Expand starred collection when the active document changes
2026-10-11 15:17:01 -04:00
Tom Moor be4d80faee fix: Add period to single-level heading numbers and use text color when not editing (#14026) 2026-10-11 09:46:55 -04:00
Tom Moor deb7d92367 fix: Persist every previous team subdomain (#14022)
The savePreviousSubdomain hook mutated the existing array in place, so
Sequelize did not detect the change and only the first previous
subdomain was ever written to the database.
2026-10-11 09:20:31 -04:00
Tom Moor e6ae742f0e fix: Preserve percent signs in exported file names (#14019) 2026-10-11 09:11:45 -04:00
Tom Moor e571208871 fix: Spelling, grammar, punctuation, and translation string errors (#14017)
* fix: Spelling, grammar, punctuation, and translation string errors

* fix: Remove duplicate period and comma splice from review feedback
2026-10-11 09:07:07 -04:00
Tom Moor a8ced149ac fix: Tighten document visibility in realtime and recent views (#14007)
* fix: Tighten document visibility in realtime and recent views

* Include group-shared drafts in recently viewed
2026-10-10 18:46:02 -04:00
Tom Moor c36a0525f4 feat: Add icon and color to user groups (#14011)
* feat: Add icon and color to user groups

* refactor: useContrastColor hook

* refactor: Share icon contrast check via useContrastColor hook, named GroupIcon export
2026-10-10 13:24:03 -04:00
Tom MoorandClaude Fable 5 022f442162 feat: Add Open Knowledge Format (OKF) import support (#13580)
* feat: Add Open Knowledge Format (OKF) import support

Maps the OKF service onto the existing Markdown zip import pipeline.
Document titles are now read from YAML frontmatter when present, for
all Markdown-based imports.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Switch to Globe icon

* Strip YAML frontmatter on import, derive import service labels from plugins

- Remove frontmatter from the document body instead of converting it to a YAML codeblock
- Drop a leading H1 that repeats the frontmatter title
- Read plugin importer labels from their Hook.Imports registration

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-10-10 14:25:02 +00:00
Tom Moor 8af64ee306 feat: Notify users when added to or removed from a group (#13999)
* feat: Notify users when added to or removed from a group

* Replace unread group membership notifications on change, link removals to group
2026-10-10 08:38:23 -04:00
Tom Moor 9c6a940f42 Send security notice to previous address when account email changes (#13979)
* feat: Send security notice to previous address when account email changes

* refactor: Send email change notice from a users.update processor

* fix: Notify previous email address even if the user was deleted
2026-10-10 08:27:47 -04:00
Tom Moor 8433475ef6 feat: Show who added a member in the group members table (#14000)
* feat: Show who added a member in the group members table

* fix: Make timestamps with tooltip detail keyboard accessible
2026-10-09 21:29:51 +00:00
Tom Moor fe97583007 fix: Emit events when deleting synced groups (#13998) 2026-10-09 17:26:58 -04:00
Tahsin Ahmed RefatandClaude Opus 5.5 62ef10d629 fix: Allow private-use URI schemes for OAuth redirect URIs (#13945)
* fix: Allow private-use URI schemes for OAuth redirect URIs

Native apps receive OAuth redirects on a private-use URI scheme
(RFC 8252 section 7.1), e.g. com.example.app:/oauth2redirect or
myapp://callback. These were rejected when registering a client
because IsUrlList only accepted http, https and ftp, and the
recommended com.example.app:/path form was also rejected at authorize
time because it has no host.

Add isPrivateUseSchemeUrl, which accepts private-use schemes while
excluding web schemes and schemes that can execute or embed content,
and use it in both places.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix: Require a protocol for OAuth redirect URIs

isURL treats a bare word such as "callback" as a hostname, so a client
could be saved with a redirect URI that validateRedirectUri would always
reject at authorize time. Require a protocol when validating the list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix: Accept one-character private-use URI destinations

The destination check compared the pathname length, so a valid opaque URI
such as myapp:a was rejected along with the empty myapp: and myapp:/.
Reject only those empty forms.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 17:59:34 -04:00
Tom MoorandClaude Opus 5.5 d460341362 feat: Gate group sync behind the GroupSync entitlement (#13990)
* feat: Gate group sync behind the GroupSync entitlement

Add a syncGroups team policy requiring an admin and the GroupSync plan
feature, enforced when enabling or setting up group sync and before each
sync task runs. Group sync can still be disabled after the entitlement is
lost.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* chore: Rename syncGroups policy to externalGroupSync

* test: Mock Business plan in SyncUserGroupsTask tests

---------

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-07 23:24:44 +00:00
Tom Moor 87091f396e perf: Avoid loading full subtrees when updating the collection structure (#13982) 2026-10-07 19:07:27 -04:00
Tom Moor 30a867fa73 fix: Include shared documents and unplaced drafts in recently viewed (#13987) 2026-10-07 18:59:19 -04:00
Tom Moor c16cfd4ca8 feat: Expose skills over MCP (#13989)
* feat: Expose skills over MCP

Implements the MCP skills extension (SEP-2640) and moves MCP code into server/mcp.

* Update skills
2026-10-07 18:58:35 -04:00
Tom Moor ac9df3d5c3 fix: Use direct team avatar url for shortcut icon on app pages (#13986) 2026-10-07 18:11:37 -04:00
Tom Moor 06991791df fix: Created by me tab filters by document creator (#13988) 2026-10-07 18:11:04 -04:00
Tom Moor 45925be395 Restrict account settings routes to session authentication (#13980) 2026-10-06 22:38:03 -04:00
Tom Moor 72e653e03a perf: Speed up the recently viewed documents query (#13970)
* perf: Speed up documents.viewed with a composite views index

Adds an index on views (userId, updatedAt) so the recently viewed query
walks only the user's rows instead of the global updatedAt index, drops
the Y.js state column from the select, and limits sort params to view
columns.

* fix: Drop the old views index concurrently
2026-10-06 22:37:18 -04:00
Tom Moor fc8d10311b fix: findByPk ignores rejectOnEmpty for malformed ids (#13974)
* fix: findByPk ignores rejectOnEmpty for malformed ids

Fixes OUTLINE-CLOUD-D8X

* test: Cover findByPk rejectOnEmpty for malformed and non-string ids
2026-10-06 17:35:10 -04:00
Tom Moor 36951f0032 feat: Align MCP server and OAuth provider with latest MCP spec guidance (#13961)
* feat: Align MCP server and OAuth provider with newer MCP spec recommendations

- Upgrade @modelcontextprotocol/sdk to 1.31.0
- Include iss in authorization responses and advertise support (RFC 9207)
- Include required scopes in the WWW-Authenticate challenge on /mcp
- Expose title, website and icons in the MCP server info
- Centralise issuer, scopes, grant types and client type mapping in OAuthHelper

* Remove OAuth authorization issuer changes
2026-10-05 19:54:22 -04:00
Tom Moor 6630ffcc5a fix: Improve collaboration connection lifecycle (#13949) 2026-10-05 08:52:14 -04:00
Tom Moor aaab59d8ca perf: Send statement timeout in the same round trip as transaction start (#13937)
* perf: Send statement timeout with the statement that begins a transaction

* chore: Upgrade pg to 8.23.0
2026-10-02 13:17:28 -04:00
Tom Moor a32e4aacd8 fix: Handle sign out events consistently across realtime services (#13936) 2026-10-02 09:45:46 -04:00
Tom Moor 7f3bc8e3d7 feat: Redirect root domain app links to the signed-in workspace (#13923)
* feat: Redirect root domain app links to the signed-in workspace

* fix: Treat non-object sessions cookie values as empty
2026-09-30 22:24:27 -04:00
Tom Moor 05ef55e38a fix: Re-authorize collaboration connections on document lifecycle events (#13899)
* fix: Invalidate collaboration connections on document lifecycle events

* fix: Invalidate descendant connections and handle unarchive
2026-09-29 07:58:43 -04:00
Tom Moor 722098edab fix: Allow CloudFront origin in CSP object-src (#13909) 2026-09-28 22:51:43 -04:00
Tom Moor 42f29a1a55 feat: Add plan-based feature entitlements (#13896)
* feat: Add plan-based feature entitlements

* feat: Gate audit log behind AuditLog entitlement

* Guard guests

* features
2026-09-27 09:40:50 -04:00
Tom Moor aacc98475d fix: Sync external groups with duplicate names accurately (#13894)
External providers can legitimately report several groups with the same
display name. Previously the second group failed the team-wide name
uniqueness check, or duplicates slipped through on creation and then
broke every subsequent sync with a validation error.

- Scope the group name uniqueness check by (team, externalId) so synced
  groups with different external ids can share a name while manually
  created groups remain unique among themselves
- Compare names with lower() equality instead of iLike so LIKE wildcards
  in names are not treated as collisions
- Stamp externalId on groups created by the syncer and backfill it on
  previously synced groups
2026-09-26 08:07:19 -04:00
Tom Moor d5bc88f893 perf: Memoize Prosemirror parsing in DocumentHelper (#13892)
Nodes are cached against the content or state they were parsed from, so
repeated helper calls on the same document parse it once. JSON transform
helpers now replace attrs instead of mutating them, as Node.toJSON shares
attrs with the cached node.
2026-09-25 20:57:58 -04:00
Tom Moor b6231f36c9 perf: Reduce query cost and reparsing in comments API (#13887)
* perf: Reduce query cost and reparsing in comments API

* perf: Join documents without default associations when listing comments

* refactor: Move comment listing into Comment.findAllForUser
2026-09-25 20:08:59 -04:00
Tom MoorandClaude Fable 5.1 abc47b442a feat: Sync group descriptions and re-sync groups on SSO validation (#13889)
* feat: Sync group descriptions and re-sync groups on SSO validation

- Sync group descriptions from group sync providers alongside names
- Lock name and description edits for externally synced groups at the
  API layer and in the edit dialog
- Move group sync into a SyncUserGroupsTask, scheduled from login and
  from ValidateSSOAccessTask after a fresh provider validation
- Add authenticationProviders.startGroupSync for providers that require
  an admin consent flow before group sync can be enabled

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* fix: Make group sync setup generic and deduplicate sync jobs

- Expose groupSyncRequiresSetup from the provider list and use it in the
  settings scene instead of checking for the azure provider name
- Rename the setup redirect query param to groupSync
- Give SyncUserGroupsTask a job id per user authentication so concurrent
  syncs for the same authentication are not queued twice

* Use existing hook

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-25 19:49:26 -04:00