579 Коммитов

Автор SHA1 Сообщение Дата
Felipe Martin
638007314e [MM-69126] Fix custom emoji upload size and GIF frame limits (#36984) (#37088)
* [MM-69126] Fix custom emoji upload size and GIF frame limits

* Assert 413 status and error ID in oversized emoji test

* Raise max emoji GIF frames to 70

* Enforce emoji GIF frame limit on the direct-write path
2026-06-25 10:05:34 +00:00
Maria A Nunez
2ff29e375b [release-10.11] Tighten thread membership cleanup on team membership changes (#37081)
* Tighten thread membership cleanup on team membership changes (#36764)

* Tighten thread membership cleanup on team membership changes

Ensure ThreadMembership rows are cleaned up when a user is removed
from or leaves a team, add a defense-in-depth filter on the thread
retrieval path so memberships referencing channels the user is no
longer a member of are excluded, and add a one-time migration to
clean up stale records on existing deployments.

https://mattermost.atlassian.net/browse/MM-69008

* Centralize per-channel membership removal and tighten tests

Extract the combined channel-member and thread-membership removal into
a shared helper used by both removeUserFromChannel and LeaveTeam, so
future code paths cannot revoke channel access without dropping the
dependent thread state. The channel-leave event is now logged after
the combined removal completes.

Also drop verbose test header comments and rename a test to a
behavior-focused name.

* Backfill channel members in thread storetest setups

The new ChannelMembers predicate on thread read queries filters out
ThreadMembership rows whose user has no ChannelMembers row for the
thread's channel. Several existing storetest setups bypassed the
normal write path and inserted threads/memberships without channel
members. Add the missing channel-member rows so the test data matches
the real-world invariant.

* Retrigger enterprise CI

Pick up enterprise merge e6953d4 (master into
MM-69008-thread-membership-team-leave) in the combined Enterprise
CI/tests lane, which pins the enterprise SHA at mattermost-side
dispatch time.

Co-authored-by: Maria A Nunez <maria.nunez@mattermost.com>

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>

* Add MySQL migration for 000195_threadmemberships_cleanup_v2

Co-authored-by: Cursor <cursoragent@cursor.com>

* Apply pre-commit lint fixes

Co-authored-by: Cursor <cursoragent@cursor.com>

* Retrigger CI

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-06-22 13:52:05 -04:00
Maria A Nunez
f6d3a7827e [release-10.11] MM-69010: Validate incoming webhook user membership (#36917)
Automatic Merge
2026-06-05 09:59:53 +02:00
Maria A Nunez
beaa59db54 [release-10.11] Restrict group_constrained to channels that support group sync (#36916)
Automatic Merge
2026-06-05 09:29:59 +02:00
Maria A Nunez
56098dd6f0 Harden post action request verification (#36840) (#36910)
Automatic Merge
2026-06-05 08:59:59 +02:00
Mattermost Build
d00e9d48d3 Automated cherry pick of #36640 (#36792)
Automatic Merge
2026-06-02 20:24:05 +02:00
Harshil Sharma
36ac3a43b1 Edit attachment permission (#36227) (#36723)
Automatic Merge
2026-05-25 12:24:05 +02:00
Julien Tant
d9a55e394c MM-68702: Reject demoting bot accounts to guest (#36487) (#36634)
Automatic Merge
2026-05-20 07:53:39 +02:00
Mattermost Build
5b85331de9 Automated cherry pick of #36469 (#36540)
Automatic Merge
2026-05-14 10:23:40 +02:00
Maria A Nunez
202d125afa [release-10.11] MM-68547: Tighten authorization on group syncable link and patch endpoints (#36434)
Automatic Merge
2026-05-06 08:53:51 +02:00
Nick Misasi
977c791e5b MM-68382: Align team creation invite permission checks (#36188) (#36402)
Automatic Merge
2026-05-05 08:23:37 +02:00
Mattermost Build
8000e59335 Automated cherry pick of #36197 (#36382)
* [MM-68393] Tighten protected role patch authorization (#36197)

* [MM-68393] Tighten protected role patch authorization

Harden role patch authorization for protected system roles and cover the restricted paths with focused API tests.

Made-with: Cursor

* [MM-68393] Fix role patch test shadowing

Rename shadowing response variables in the protected role patch tests so govet passes in core and enterprise check-style jobs.

Made-with: Cursor

* [MM-68393] Block privileged role permissions

Made-with: Cursor
(cherry picked from commit 99b73d4c4acf5ff3546c2548a5aaa804c2aa1b04)

* Fix role patch tests for release-10.11 context and LoginSystemManager APIs

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Nick Misasi <nick.misasi@mattermost.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-04 11:04:37 -04:00
Mattermost Build
6fd49f56b5 MM-68526: Harden remote cluster patch response (#36288) (#36313)
Automatic Merge
2026-04-28 20:47:45 +02:00
Mattermost Build
610a28e9fa Automated cherry pick of #35562 (#36095)
* adds team member data sanitizing (#35562)

* adds team member data sanitizing

* assert using require

* adds data sanitizing to team members for user endpoint

* team admin data visibility now tests with different user

(cherry picked from commit 2be57a7ec0c67004b77c76386f20a630920196e3)

* removes wrong argument in test helper calls

* fix: add explicit permission grant in team members test (#36007)

* fix: add explicit permission grant in team members test

TestGetTeamMembersForUserRoleDataSanitization was relying on a permission
side-effect leaked from concurrent tests. Under fullyparallel, another test
temporarily adds PermissionReadOtherUsersTeams to system_user role, which
the team admin subtest accidentally benefits from. Under sequential execution
(binary parameters mode), no concurrent test leaks this permission, so the
team admin correctly gets 403.

Fix by explicitly granting ReadOtherUsersTeams in the subtest setup, matching
the pattern used in adjacent subtests.

Release Note
NONE

Co-authored-by: Claude <claude@anthropic.com>

* fix: remove explanatory comment per review feedback

---------

Co-authored-by: Claude <claude@anthropic.com>

* removes extra arg from test helper call

---------

Co-authored-by: Carlos Garcia <carlos.garcia@mattermost.com>
Co-authored-by: Pavel Zeman <pavel.zeman@mattermost.com>
Co-authored-by: Claude <claude@anthropic.com>
2026-04-16 08:58:14 +08:00
Carlos Garcia
b21ef30202 Mm 67896 manual cherry pick onto release 10.11 (#35989)
* improves time limit checks

* consistently check for presence of patch fields

* fix variable shadowing in test

* allow idempotent pinning operations with time limit expired

* new utility function for post limit time check

* fix style issue

* Add missing E2E CI files and delivery-platform migration for release-10.11

- Add calculate-playwright-results and calculate-cypress-results GitHub Actions
  (referenced by e2e-tests-playwright-template.yml and e2e-tests-cypress-template.yml
  but never backported to release-10.11)
- Add e2e-tests/playwright/merge.config.mjs (required by merge-reports step)
- Add run-specs Makefile target and server.run_specs.sh (required by run-failed-tests job)
- Fix merge-shard-results step: pin @playwright/test version and add fallback
  for when no blob reports exist (json reporter output used directly)
- Remove pull_request trigger from e2e-tests-ci.yml (delivery-platform migration)
- Remove dead e2e-fulltests-ci.yml and e2e-tests-ci-template.yml

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: yasserfaraazkhan <attitude3cena.yf@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 18:38:57 +08:00
Christopher Poile
c654f0502f [MM-67143] cherry pick of #34922 (#35800)
Automatic Merge
2026-03-27 07:30:55 +01:00
Mattermost Build
450dba8cad Automated cherry pick of #35558 (#35716)
Automatic Merge
2026-03-20 21:30:55 +01:00
Guillermo Vayá
532f2882d1 [MM-67377] cherry-pick Fix (#35336) (#35657)
Automatic Merge
2026-03-20 12:30:54 +01:00
Mattermost Build
bc1a2b34b1 keeps plugin config on reenablement (#35545) (#35581)
* keeps plugin config on reenablement

* fixes local config patch on plugin reenablement

(cherry picked from commit c9a4092ac0a20351e3c2e0ac0cb593cc28b5bc0e)

Co-authored-by: Carlos Garcia <carlos.garcia@mattermost.com>
2026-03-16 08:01:26 +02:00
Mattermost Build
a8d44e5918 Use standard session handler for updateUserAuth endpoint (#35488) (#35505)
Automatic Merge
2026-03-06 10:25:23 +01:00
Pablo Vélez
e1a78d1e91 Mm 66813 sso callback metadata (#34955) (#35383)
Automatic Merge
2026-02-20 09:09:32 +02:00
Mattermost Build
39ba0a3cd7 MM-66886 Add rate limiting to login endpoint (#34943) (#35314)
Automatic Merge
2026-02-16 12:39:39 +02:00
Doug Lauder
463f7a0511 Cherry-pick MM-66789: Restrict log downloads to a root path for support packets (#35164)
Automatic Merge
2026-02-02 21:23:28 +02:00
Ibrahim Serdar Acikgoz
d2594e5046 Patch MM-67126 issue (#35142)
Automatic Merge
2026-02-02 12:53:32 +02:00
Christopher Poile
452bad21e9 manual cherry-pick: [MM-67202] Validate auth method in account switch (#34981) (#35143)
* fix account authorization type switch

* improve test clarity

* refactor tests for clarity
2026-01-30 16:36:57 +02:00
Rajat Dabade
707f7ba42b Cherry-pick PR for guest-user-file-upload-permission for release-10.11 (#35073)
Automatic Merge
2026-01-27 14:53:28 +02:00
Christopher Poile
51f2e2fdd5 Manual cherrypick MM-67055: Fix permalink embeds in ws msg (#34893) (#35059)
Automatic Merge
2026-01-26 19:23:30 +02:00
Daniel Espino García
21a86506f9 Manual Cherrypick: Add audits for accessing posts without membership (#31266) (#35022)
Automatic Merge
2026-01-26 12:23:28 +02:00
Mattermost Build
3b1b8d9114 Automated cherry pick of #34693 (#34972)
Automatic Merge
2026-01-22 07:18:51 +02:00
Pablo Vélez
43e797010b MM-66092 - enhance user permissions data structure validations (#34654) (#35006)
Automatic Merge
2026-01-21 12:48:52 +02:00
Mattermost Build
06c6ee2566 [MM-66789] Restrict ImportSettings.Directory changes via API and add validation (#34653) (#34987)
Automatic Merge
2026-01-20 12:54:28 +02:00
Mattermost Build
ba27ba1f8c Automated cherry pick of #34715 (#34849)
Automatic Merge
2026-01-12 19:47:30 +02:00
Jesse Hallam
a07b1d7a8c MM-66424: Improve team filtering in common teams API (#34454) (#34854)
Cherry-pick 6404ab29acc04901c5cb1cf5ad97fc3c0693e2cd into release-10.11
2026-01-06 12:50:30 -04:00
Jesse Hallam
989f3a36dc MM-66757: Improve WebSocket user update events (#34600) (#34856)
* improve TestUserUpdateEvents

* improve CheckUserSanitization

* check user sanitization in TestUserUpdateEvents

* minimally sanitize user sent to event creator
2026-01-06 11:22:05 -05:00
Mattermost Build
f361e7d75a Automated cherry pick of #34247 (#34257)
Automatic Merge
2025-10-27 12:59:15 +02:00
Ibrahim Serdar Acikgoz
9f54e5cdc3 [MM-65684] Sanitize teams for /api/v4/channels/{channel_id}/common_teams endpoint (#34110) (#34182) 2025-10-17 16:55:42 +03:00
Mattermost Build
83a5be3f9e MM-65743: Sanitize in email verification endpoint (#33914) (#34121)
(cherry picked from commit 057efca74ee29862bca6ef6336bfbf3456f65bf6)

Co-authored-by: Jesse Hallam <jesse.hallam@gmail.com>
2025-10-13 06:38:25 +00:00
JG Heithcock
375ce229f4 MM 65084 server-side (#33861) (#34006) (#34044)
* MM 65084 server-side (#33861) (#34006)

Automatic Merge

* Add ConsumeOnce method to store layers

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2025-10-06 15:20:08 -07:00
Mattermost Build
fcd316844e Improve self checks when adding a new channel member (#33404) (#33925)
Automatic Merge
2025-09-18 10:19:15 +03:00
Mattermost Build
98acefe911 Sanatize LastViewedAt and LastUpdateAt for other users on channel member object (#33835) (#33905)
Automatic Merge
2025-09-16 13:19:10 +03:00
Mattermost Build
e8c7e7d025 [MM-64453] Guest shouldn't discover public channels that they are not member of (#31327) (#33778)
Automatic Merge
2025-08-22 12:04:05 +03:00
Mattermost Build
24c4a3677b [MM-64445] api4/channels_test: Add tests cases for guest user private channels (#31319) (#33776)
Automatic Merge
2025-08-22 11:34:05 +03:00
Mattermost Build
2fceeceba6 MM-64675: Enable modification of plugin settings in local mode (#33376) (#33452)
Automatic Merge
2025-07-17 20:28:42 +03:00
Mattermost Build
07a34f02b6 MM-64531: [Shared Channels] Users on different remote servers should not communicate unless the remotes have established secure connection. (#30985) (#33434)
Automatic Merge
2025-07-15 11:58:41 +03:00
Harrison Healey
ad38971dd6 MM-64658 Fix handling of upload sessions (#32141)
* MM-64658 Fix handling of upload sessions

* Fix style issue
2025-07-08 16:46:00 +00:00
Miguel de la Cruz
d8758f8984 Improve response on team restore (#32118)
Co-authored-by: Miguel de la Cruz <miguel@ctrlz.es>
Co-authored-by: Mattermost Build <build@mattermost.com>
2025-07-01 16:54:30 +00:00
Daniel Espino García
1b7d27707d Fix MM64178 (#30957)
Co-authored-by: Mattermost Build <build@mattermost.com>
2025-06-30 16:43:59 -05:00
catalintomai
2b8f7743b6 MM-64687: Racy tests in TestSharedChannelPostMetadataSync (#32144) 2025-06-27 09:11:54 +02:00
Nick Misasi
9e7849647c [CLD-9238] Direct preview user to proper team based on use case (#31784)
* Remove pricing modal. Adjust everywhere to instead open mattermost.com/pricing. When air gapped, don't show buttons to view plans.

* Fix lint

* Further clean up of unused code. Fixes for linter

* Remove onboarding tasklist for previews, add Cloud previer banner

* Fixes for linter, i18n

* Revert dev lines

* Fix lint

* When below one minute, switch to seconds

* fix linter

* Add scaffolding for new Cloud Preview Modal

* Style updates

* Fix tests

* fixes for PR feedback

* useExternalLink for opening pricing modal with enriched params

* Fix i17n

* fix style

* Fix style, tests

* Fix linter, types

* Add file

* Make types even more fixed

* fix: correct test case for SKU label not provided scenario

The test "should not render SKU label when not provided" was incorrectly using baseContent which includes a SKU label. Fixed by creating contentWithoutSku that explicitly sets skuLabel to undefined to properly test the scenario where no SKU label is provided.

Co-authored-by: Nick Misasi <nickmisasi@users.noreply.github.com>

* Fine I'll do it myself

* fix linter

* Refactors

* Adjustments from PR review. Adjustments to video experience (poster/play button) and starting to translate

* Fix i18n

* Accept use case in CWS login, redirect to proper team, with filtered content in preview modal

* Wrap translation strings with defineMessage for i18n extraction

- Add import for defineMessage and MessageDescriptor from react-intl
- Update type definition to use MessageDescriptor for better type safety  
- Wrap all skuLabel, title, and subtitle objects with defineMessage() calls
- This ensures the i18n-extract tool can properly detect translation strings

Co-authored-by: Nick Misasi <nickmisasi@users.noreply.github.com>

* Fix i18n

* Hiding modal will presist through refreshes

* Fix linter

* Add exception to notification permission bar for cloud previews

* Use regular modal close button

* Fix pipelines

* Fix i18n

* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_content.scss

Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>

* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_content.scss

Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>

* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_content.scss

Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>

* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_content.tsx

Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>

* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_content.scss

Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>

* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_content.scss

Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>

* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_controller.tsx

Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>

* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_controller.tsx

Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>

* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_controller.scss

Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>

* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_controller.tsx

Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>

* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_controller.tsx

Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>

* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_controller.tsx

Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>

* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_controller.tsx

Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>

* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_controller.scss

Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>

* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_controller.scss

Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>

* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_content.scss

Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>

* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_content.scss

Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>

* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_content.scss

Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>

* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_content.scss

Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>

* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_content.scss

Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>

* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_content.scss

Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>

* Remove unnecessary CSS properties from preview modal content

Remove display: flex, height: 100%, and flex-direction: column from .preview-modal-content selector as they have no effect per code review feedback.

Co-authored-by: Nick Misasi <nickmisasi@users.noreply.github.com>

* feat: use getBool selector instead of get for boolean preference check

- Replace getPreference with getBool to avoid explicit === 'true' comparison
- Follows Harrison's review suggestion for cleaner boolean handling

Co-authored-by: Nick Misasi <nickmisasi@users.noreply.github.com>

* fix linter

* Fixes for PR review

* Fix linter

* Fix i18n

* fix linter

* Changes to address Harrison's feedback

* Change file name, remove index.tsx

* change file name, remove index.tsx

* Add the new files

---------

Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Nick Misasi <nickmisasi@users.noreply.github.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
2025-06-26 20:30:26 -04:00
David Krauser
aaa62a40ae [MM-64686] Expose audit logging functionality via plugin API (#31204)
This commit exposes audit logging functionality to plugins via the plugin API, allowing plugins to create and log audit records. Additionally, it addresses a gob encoding issue that could cause plugin crashes when audit data contains nil pointers or unregistered types.
2025-06-25 20:37:32 -04:00