-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Release 8.4.2 #40529
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Release 8.4.2 #40529
Changes from all commits
171a46b
f422eb6
d7bf6f3
ff254bf
3a3f0e1
bc2eb5b
65eadbd
acf3f97
1a28d0c
69df443
25e87d8
0f33a7b
b0c593d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| '@rocket.chat/model-typings': patch | ||
| '@rocket.chat/models': patch | ||
| '@rocket.chat/meteor': patch | ||
| --- | ||
|
|
||
| Ensures OAuth tokens are cleaned up after user deactivation |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| '@rocket.chat/meteor': patch | ||
| --- | ||
|
|
||
| Bump @rocket.chat/meteor version. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| --- | ||
| '@rocket.chat/meteor': patch | ||
| '@rocket.chat/rest-typings': patch | ||
| --- | ||
|
|
||
| Fixes the `users.presence` endpoint returning an empty array when called with multiple comma-separated IDs, caused by `ajvQuery` coercing the string into a single-element array after the OpenAPI migration |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| '@rocket.chat/model-typings': patch | ||
| '@rocket.chat/models': patch | ||
| '@rocket.chat/meteor': patch | ||
| --- | ||
|
|
||
| Ensures that deactivated users have their login tokens cleaned up in users.deactivateidle | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| '@rocket.chat/meteor': patch | ||
| --- | ||
|
|
||
| Ensures the Meteor method for translateMessage validates access and types |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| '@rocket.chat/meteor': patch | ||
| --- | ||
|
|
||
| Ensures the visitor token is not present in the visitors.info response |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| '@rocket.chat/meteor': patch | ||
| --- | ||
|
|
||
| Ensures the autotranslate.translateMessage endpoint checks for room access |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| import { MeteorError, Team, api, Calendar } from '@rocket.chat/core-services'; | ||
| import type { IExportOperation, ILoginToken, IPersonalAccessToken, IUser, UserStatus } from '@rocket.chat/core-typings'; | ||
| import { Users, Subscriptions, Sessions } from '@rocket.chat/models'; | ||
| import { Users, Subscriptions, Sessions, OAuthAccessTokens, OAuthRefreshTokens, OAuthAuthCodes } from '@rocket.chat/models'; | ||
| import { | ||
| isUserCreateParamsPOST, | ||
| isUserSetActiveStatusParamsPOST, | ||
|
|
@@ -548,9 +548,26 @@ API.v1.post( | |
| const lastLoggedIn = new Date(); | ||
| lastLoggedIn.setDate(lastLoggedIn.getDate() - daysIdle); | ||
|
|
||
| // since we're deactiving users that are not logged in, there is no need to send data through WS | ||
| const ids = await Users.findActiveNotLoggedInAfterWithRole(lastLoggedIn, role, { projection: { _id: 1 } }) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: This read-then-update-then-notify sequence can broadcast incorrect user state for users that no longer match the update filter at update time. Prompt for AI agents |
||
| .map(({ _id }: { _id: string }) => _id) | ||
| .toArray(); | ||
|
|
||
| const { modifiedCount: count } = await Users.setActiveNotLoggedInAfterWithRole(lastLoggedIn, role, false); | ||
|
|
||
| await Promise.all([ | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P1: OAuth token revocation is using a pre-update user ID snapshot, which can revoke tokens for users who are no longer deactivated by the subsequent update. (Based on your team's feedback about concurrency implications in async flows.) Prompt for AI agents |
||
| OAuthAccessTokens.deleteByUserIds(ids), | ||
| OAuthRefreshTokens.deleteByUserIds(ids), | ||
| OAuthAuthCodes.deleteByUserIds(ids), | ||
| ]); | ||
|
|
||
| ids.forEach((_id) => { | ||
| void notifyOnUserChange({ | ||
| clientAction: 'updated', | ||
| id: _id, | ||
| diff: { 'services.resume.loginTokens': [], 'active': false }, | ||
| }); | ||
| }); | ||
|
|
||
| return API.v1.success({ | ||
| count, | ||
| }); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P2: The changeset summary appears unrelated to this PR’s actual fixes, so release notes for this patch will be misleading.
Prompt for AI agents