Commit graph

22111 commits

Author SHA1 Message Date
Catalin I. Tomai
c0fa219f08 remove file 2026-02-03 21:50:28 +01:00
Catalin I. Tomai
0426e32e52 Merge branch 'master' into mattermost-pages-channel 2026-02-03 21:37:04 +01:00
Catalin I. Tomai
16c59e93c9 cypress fixes 2026-02-03 17:56:30 +01:00
Nick Misasi
0263262ef4
MM-66577 Preserve locale in rewrite prompt (#35013)
Some checks are pending
API / build (push) Waiting to run
Server CI / Compute Go Version (push) Waiting to run
Server CI / Check mocks (push) Blocked by required conditions
Server CI / Check go mod tidy (push) Blocked by required conditions
Server CI / check-style (push) Blocked by required conditions
Server CI / Check serialization methods for hot structs (push) Blocked by required conditions
Server CI / Vet API (push) Blocked by required conditions
Server CI / Check migration files (push) Blocked by required conditions
Server CI / Generate email templates (push) Blocked by required conditions
Server CI / Check store layers (push) Blocked by required conditions
Server CI / Check mmctl docs (push) Blocked by required conditions
Server CI / Postgres with binary parameters (push) Blocked by required conditions
Server CI / Postgres (push) Blocked by required conditions
Server CI / Postgres (FIPS) (push) Blocked by required conditions
Server CI / Generate Test Coverage (push) Blocked by required conditions
Server CI / Run mmctl tests (push) Blocked by required conditions
Server CI / Run mmctl tests (FIPS) (push) Blocked by required conditions
Server CI / Build mattermost server app (push) Blocked by required conditions
Web App CI / check-lint (push) Waiting to run
Web App CI / check-i18n (push) Blocked by required conditions
Web App CI / check-types (push) Blocked by required conditions
Web App CI / test (platform) (push) Blocked by required conditions
Web App CI / test (mattermost-redux) (push) Blocked by required conditions
Web App CI / test (channels shard 1/4) (push) Blocked by required conditions
Web App CI / test (channels shard 2/4) (push) Blocked by required conditions
Web App CI / test (channels shard 3/4) (push) Blocked by required conditions
Web App CI / test (channels shard 4/4) (push) Blocked by required conditions
Web App CI / upload-coverage (push) Blocked by required conditions
Web App CI / build (push) Blocked by required conditions
* Preserve rewrite locale in prompt

* Add license header to rewrite tests
2026-02-03 11:32:03 -05:00
Nick Misasi
aa5d51131d
Register product icon change (#34883)
* Adjust registerProduct to accept generic icon

* Undo unnecessary changes

* Anotha one

* Fix linting errors in product menu tests

- Fix jsx-quotes to use single quotes instead of double quotes
- Fix react/jsx-max-props-per-line by placing props on separate lines
- Fix react/jsx-no-literals by wrapping literal strings in JSX expression containers
- Fix react/jsx-wrap-multilines by wrapping multiline JSX in parentheses
- Fix react/jsx-closing-bracket-location for proper bracket alignment

* don't use snapshots or enzyme

* Fix pipelines?
2026-02-03 10:45:02 -05:00
Erwan Martin
f3c6602725
Allow building the server on FreeBSD (#25838)
* Allow building the server on FreeBSD

* Fix merge

---------

Co-authored-by: Erwan Martin <erwan@pepper.com>
Co-authored-by: Alejandro García Montoro <alejandro.garciamontoro@gmail.com>
2026-02-03 14:05:16 +00:00
Catalin I. Tomai
3bf99e99ab merge with master 2026-02-03 14:21:28 +01:00
Catalin I. Tomai
5c00787f02 more improvements 2026-02-03 13:32:15 +01:00
Ben Cooke
36479bd721
Configurable workers and move sweeper job to job infra (#35007)
Some checks are pending
API / build (push) Waiting to run
Server CI / Compute Go Version (push) Waiting to run
Server CI / Check mocks (push) Blocked by required conditions
Server CI / Check go mod tidy (push) Blocked by required conditions
Server CI / check-style (push) Blocked by required conditions
Server CI / Check serialization methods for hot structs (push) Blocked by required conditions
Server CI / Vet API (push) Blocked by required conditions
Server CI / Check migration files (push) Blocked by required conditions
Server CI / Generate email templates (push) Blocked by required conditions
Server CI / Check store layers (push) Blocked by required conditions
Server CI / Check mmctl docs (push) Blocked by required conditions
Server CI / Postgres with binary parameters (push) Blocked by required conditions
Server CI / Postgres (push) Blocked by required conditions
Server CI / Postgres (FIPS) (push) Blocked by required conditions
Server CI / Generate Test Coverage (push) Blocked by required conditions
Server CI / Run mmctl tests (push) Blocked by required conditions
Server CI / Run mmctl tests (FIPS) (push) Blocked by required conditions
Server CI / Build mattermost server app (push) Blocked by required conditions
Web App CI / check-lint (push) Waiting to run
Web App CI / check-i18n (push) Blocked by required conditions
Web App CI / check-types (push) Blocked by required conditions
Web App CI / test (platform) (push) Blocked by required conditions
Web App CI / test (mattermost-redux) (push) Blocked by required conditions
Web App CI / test (channels shard 1/4) (push) Blocked by required conditions
Web App CI / test (channels shard 2/4) (push) Blocked by required conditions
Web App CI / test (channels shard 3/4) (push) Blocked by required conditions
Web App CI / test (channels shard 4/4) (push) Blocked by required conditions
Web App CI / upload-coverage (push) Blocked by required conditions
Web App CI / build (push) Blocked by required conditions
2026-02-02 15:52:42 -05:00
Matthew Birtch
95ba2db4f0
[MM-66862] Channel Info RHS: add ability to rename and open channel settings (#34708)
* Channel Info RHS: add rename-from-info and settings access

Add channel name editable area with pencil hover and wire to a lightweight Rename Channel modal; add Channel Settings item to RHS menu with permission checks; ensure navigation after rename uses relative path to avoid 404.

* linter changes

* add padding so field labels don't get cut off

* fixes for keyboard accessibility and tooltips

* don't show channel settings for DMs and GMs

* chore(i18n): run extract to reorder new keys and fix CI

Re-extracted webapp i18n to place newly added keys (editable tooltips and rename modal) in canonical order expected by translation tooling.

* use generic_btn.cancel/save for rename modal buttons

* chore(i18n): remove unused rename_channel.cancel/save keys

* updated tests to account for new elements in the info rhs

* add cypress test for new rhs info function

* fix linting issues

* fixed tests

* linter fixes

* tweak position of edit button

* style tweaks, remove subtitle from info rhs head (redundant now), update archived state

* added 'unarchive' button to archived notice, updated translations

* fixed tests that I broke in channel info header

* add url name to channel info view

* update to 'channel handle' instead of url name'

* change order of channel handle

* add copy button

* Update about_area_channel.test.tsx

* fixed test and brought back channel subtitle in header for consistency

* fixed header test

* make channel info rhs scrollable

* fix merge issue

* Fix lint

---------

Co-authored-by: yasserfaraazkhan <attitude3cena.yf@gmail.com>
2026-02-02 17:34:32 +00:00
Harrison Healey
4049300129
Change moduleResolution to bundler for web app (#35081)
This tells the TypeScript compiler (only used for type checking in the web app)
to use the `imports` and `exports` field of a package's `package.json` to find
modules. Those fields are standard in newer versions of Node.js, and hopefully
supporting them means that we'll have to do less work to configure tooling in
the future.

We could also get similar behaviour by using the `nodenext` option, but that
adds some additional requirements to include file extensions which ES Modules
technically require, but I don't think we need to enforce because other tooling
doesn't require them.

I wanted to make that change in all of the subpackages as well, but we can't do
that without having TypeScript output ES Modules which, unless we change their
build processes to generate multiple formats (like the shared package in
client package, or the types package which is more than I want to do at the
moment.

The changes to other files are either because they incorrectly imported types
from a file that isn't intentionally exposed by the plugin or it's because we
had a typo in a file path.
2026-02-02 12:08:04 -05:00
Weblate (bot)
6f9b6f3364
Translations update from Mattermost Weblate (#35159)
Some checks are pending
API / build (push) Waiting to run
Server CI / Compute Go Version (push) Waiting to run
Server CI / Check mocks (push) Blocked by required conditions
Server CI / Check go mod tidy (push) Blocked by required conditions
Server CI / check-style (push) Blocked by required conditions
Server CI / Check serialization methods for hot structs (push) Blocked by required conditions
Server CI / Vet API (push) Blocked by required conditions
Server CI / Check migration files (push) Blocked by required conditions
Server CI / Generate email templates (push) Blocked by required conditions
Server CI / Check store layers (push) Blocked by required conditions
Server CI / Check mmctl docs (push) Blocked by required conditions
Server CI / Postgres with binary parameters (push) Blocked by required conditions
Server CI / Postgres (push) Blocked by required conditions
Server CI / Postgres (FIPS) (push) Blocked by required conditions
Server CI / Generate Test Coverage (push) Blocked by required conditions
Server CI / Run mmctl tests (push) Blocked by required conditions
Server CI / Run mmctl tests (FIPS) (push) Blocked by required conditions
Server CI / Build mattermost server app (push) Blocked by required conditions
Web App CI / check-lint (push) Waiting to run
Web App CI / check-i18n (push) Blocked by required conditions
Web App CI / check-types (push) Blocked by required conditions
Web App CI / test (platform) (push) Blocked by required conditions
Web App CI / test (mattermost-redux) (push) Blocked by required conditions
Web App CI / test (channels shard 1/4) (push) Blocked by required conditions
Web App CI / test (channels shard 2/4) (push) Blocked by required conditions
Web App CI / test (channels shard 3/4) (push) Blocked by required conditions
Web App CI / test (channels shard 4/4) (push) Blocked by required conditions
Web App CI / upload-coverage (push) Blocked by required conditions
Web App CI / build (push) Blocked by required conditions
* Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/

* Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/

* Translated using Weblate (Polish)

Currently translated at 99.0% (2924 of 2951 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/pl/

* Translated using Weblate (Norwegian Bokmål)

Currently translated at 78.3% (5457 of 6963 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/nb_NO/

* Translated using Weblate (Polish)

Currently translated at 95.2% (6630 of 6963 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/pl/

* Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/

---------

Co-authored-by: master7 <marcin.karkosz@rajska.info>
Co-authored-by: Frank Paul Silye <frankps@gmail.com>
2026-02-02 14:04:07 +00:00
Jesse Hallam
70a50edcf2
[MM-67021] Fix 500 errors on check-cws-connection in non-Cloud environments (#34786)
* Fix 500 errors on check-cws-connection in non-Cloud environments

The check-cws-connection endpoint was returning 500 errors in
self-hosted enterprise environments because:

1. The client only checked BuildEnterpriseReady before making the
   request, which is true for all enterprise builds
2. The server handler didn't check for a Cloud license before
   attempting to connect to CWS
3. The CWS URL is not configured in non-Cloud environments, causing
   the connection check to fail

This fix:
- Server: Add IsCloud() license check to match other cloud endpoints,
  returning 403 instead of 500 for non-Cloud licenses
- Client: Add Cloud license check to skip the request entirely in
  non-Cloud environments

* Add unit tests for check-cws-connection license check

* Return JSON status from check-cws-connection endpoint

Change the check-cws-connection endpoint to return 200 with a JSON body
containing status (available/unavailable) instead of using HTTP error
codes. This allows the endpoint to be used for air-gap detection on
self-hosted instances, not just Cloud deployments.

* i18n

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2026-02-02 13:41:14 +00:00
Catalin Tomai
45cf7a7cf9 Fix XSS vulnerabilities in markdown paste and add comprehensive tests
Security fixes:
- Add sanitize option to marked() to escape HTML embedded in markdown
- Extend URL sanitization to cover both href and src attributes
- Add null check to isUrlSafe() to prevent crashes

Code improvements:
- Remove unused parseDOM rules from export-only schema (~65 lines)
- Export security helper functions for testing

Tests added:
- Add tests for sanitizeCodeLanguage, sanitizeFilename, escapeMarkdownText
- Add tests for extractFileId, getFileExtension
- Add tests for video node, file attachment, channel mention handling
- Add XSS prevention tests for paste markdown extension
- Add E2E test for markdown round-trip

Script fix:
- Remove non-existent test file reference from run_pages_tests.sh

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 12:32:09 +01:00
unified-ci-app[bot]
b74b5fe83f
chore: Update NOTICE.txt file with updated dependencies (#35158)
Automatic Merge
2026-02-02 13:23:28 +02:00
Harshil Sharma
990e9b34bf
Removed initial BOR post reveal WS event for post author (#34939)
* Removed initial BOR post reveal WS event for post author

* restored package lock

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2026-02-02 16:16:50 +05:30
Harshil Sharma
dc69319c67
Moved flag post option before delete post (#35019)
Co-authored-by: Mattermost Build <build@mattermost.com>
2026-02-02 16:16:21 +05:30
sabril
981ff0bc46
MM-66362 feat: run e2e full tests after successful smoke tests both in cypress and playwright (#34868)
Some checks are pending
API / build (push) Waiting to run
Server CI / Compute Go Version (push) Waiting to run
Server CI / Check mocks (push) Blocked by required conditions
Server CI / Check go mod tidy (push) Blocked by required conditions
Server CI / check-style (push) Blocked by required conditions
Server CI / Check serialization methods for hot structs (push) Blocked by required conditions
Server CI / Vet API (push) Blocked by required conditions
Server CI / Check migration files (push) Blocked by required conditions
Server CI / Generate email templates (push) Blocked by required conditions
Server CI / Check store layers (push) Blocked by required conditions
Server CI / Check mmctl docs (push) Blocked by required conditions
Server CI / Postgres with binary parameters (push) Blocked by required conditions
Server CI / Postgres (push) Blocked by required conditions
Server CI / Postgres (FIPS) (push) Blocked by required conditions
Server CI / Generate Test Coverage (push) Blocked by required conditions
Server CI / Run mmctl tests (push) Blocked by required conditions
Server CI / Run mmctl tests (FIPS) (push) Blocked by required conditions
Server CI / Build mattermost server app (push) Blocked by required conditions
Web App CI / check-lint (push) Waiting to run
Web App CI / check-i18n (push) Blocked by required conditions
Web App CI / check-types (push) Blocked by required conditions
Web App CI / test (platform) (push) Blocked by required conditions
Web App CI / test (mattermost-redux) (push) Blocked by required conditions
Web App CI / test (channels shard 1/4) (push) Blocked by required conditions
Web App CI / test (channels shard 2/4) (push) Blocked by required conditions
Web App CI / test (channels shard 3/4) (push) Blocked by required conditions
Web App CI / test (channels shard 4/4) (push) Blocked by required conditions
Web App CI / upload-coverage (push) Blocked by required conditions
Web App CI / build (push) Blocked by required conditions
* feat: run e2e full tests after successful smoke tests both in cypress and playwright

* fix lint check on jsdoc req in playwright test

* update smoke test filter

* update test filter for cypress tests

* update docker services, fix branch convention and rearrange secrets

* update e2e-test workflow docs

* reorganized

* fix lint

* fix playwright template

* fix results assertion

* add retest, e2e-test-verified, gh comments of failed tests, path filters, run e2e-tests check first and demote unstable tests

* run using master image for e2e-only changes, add ts/js actions for cypress and playwright calculations, add verified by label

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2026-02-02 08:37:55 +08:00
Catalin I. Tomai
88734153bc merge with master 2026-02-01 23:39:23 +01:00
Catalin I. Tomai
72f2b29a19 few improvements 2026-02-01 23:02:11 +01:00
Pablo Vélez
8db2ef6b9f
MM-67365 - adjust bor icons and priority labels in compact mode (#35121)
Some checks failed
API / build (push) Has been cancelled
Server CI / Compute Go Version (push) Has been cancelled
Web App CI / check-lint (push) Has been cancelled
Server CI / Check mocks (push) Has been cancelled
Server CI / Check go mod tidy (push) Has been cancelled
Server CI / check-style (push) Has been cancelled
Server CI / Check serialization methods for hot structs (push) Has been cancelled
Server CI / Vet API (push) Has been cancelled
Server CI / Check migration files (push) Has been cancelled
Server CI / Generate email templates (push) Has been cancelled
Server CI / Check store layers (push) Has been cancelled
Server CI / Check mmctl docs (push) Has been cancelled
Server CI / Postgres with binary parameters (push) Has been cancelled
Server CI / Postgres (push) Has been cancelled
Server CI / Postgres (FIPS) (push) Has been cancelled
Server CI / Generate Test Coverage (push) Has been cancelled
Server CI / Run mmctl tests (push) Has been cancelled
Server CI / Run mmctl tests (FIPS) (push) Has been cancelled
Server CI / Build mattermost server app (push) Has been cancelled
Web App CI / check-i18n (push) Has been cancelled
Web App CI / check-types (push) Has been cancelled
Web App CI / test (platform) (push) Has been cancelled
Web App CI / test (mattermost-redux) (push) Has been cancelled
Web App CI / test (channels shard 1/4) (push) Has been cancelled
Web App CI / test (channels shard 2/4) (push) Has been cancelled
Web App CI / test (channels shard 3/4) (push) Has been cancelled
Web App CI / test (channels shard 4/4) (push) Has been cancelled
Web App CI / upload-coverage (push) Has been cancelled
Web App CI / build (push) Has been cancelled
* MM-67365 - adjust bor icons and priority labels in compact mode

* fix linter issue
2026-01-31 15:09:25 -05:00
Julien Tant
288816834d
Bump playbooks to v2.7.0 (#35150)
Some checks are pending
API / build (push) Waiting to run
Server CI / Compute Go Version (push) Waiting to run
Server CI / Check mocks (push) Blocked by required conditions
Server CI / Check go mod tidy (push) Blocked by required conditions
Server CI / check-style (push) Blocked by required conditions
Server CI / Check serialization methods for hot structs (push) Blocked by required conditions
Server CI / Vet API (push) Blocked by required conditions
Server CI / Check migration files (push) Blocked by required conditions
Server CI / Generate email templates (push) Blocked by required conditions
Server CI / Check store layers (push) Blocked by required conditions
Server CI / Check mmctl docs (push) Blocked by required conditions
Server CI / Postgres with binary parameters (push) Blocked by required conditions
Server CI / Postgres (push) Blocked by required conditions
Server CI / Postgres (FIPS) (push) Blocked by required conditions
Server CI / Generate Test Coverage (push) Blocked by required conditions
Server CI / Run mmctl tests (push) Blocked by required conditions
Server CI / Run mmctl tests (FIPS) (push) Blocked by required conditions
Server CI / Build mattermost server app (push) Blocked by required conditions
Web App CI / check-lint (push) Waiting to run
Web App CI / check-i18n (push) Blocked by required conditions
Web App CI / check-types (push) Blocked by required conditions
Web App CI / test (platform) (push) Blocked by required conditions
Web App CI / test (mattermost-redux) (push) Blocked by required conditions
Web App CI / test (channels shard 1/4) (push) Blocked by required conditions
Web App CI / test (channels shard 2/4) (push) Blocked by required conditions
Web App CI / test (channels shard 3/4) (push) Blocked by required conditions
Web App CI / test (channels shard 4/4) (push) Blocked by required conditions
Web App CI / upload-coverage (push) Blocked by required conditions
Web App CI / build (push) Blocked by required conditions
2026-01-30 11:42:41 -07:00
Andre Vasconcelos
3321db82c3
Bumping prepackaged version of MS Teams Meetings plugin to 2.4.0 (#35146) 2026-01-30 18:03:20 +02:00
Jesse Hallam
5bb5261c72
MM-67279: Fix private channel enumeration via /mute slash command (#35099)
Some checks are pending
API / build (push) Waiting to run
Server CI / Compute Go Version (push) Waiting to run
Server CI / Check mocks (push) Blocked by required conditions
Server CI / Check go mod tidy (push) Blocked by required conditions
Server CI / check-style (push) Blocked by required conditions
Server CI / Check serialization methods for hot structs (push) Blocked by required conditions
Server CI / Vet API (push) Blocked by required conditions
Server CI / Check migration files (push) Blocked by required conditions
Server CI / Generate email templates (push) Blocked by required conditions
Server CI / Check store layers (push) Blocked by required conditions
Server CI / Check mmctl docs (push) Blocked by required conditions
Server CI / Postgres with binary parameters (push) Blocked by required conditions
Server CI / Postgres (push) Blocked by required conditions
Server CI / Postgres (FIPS) (push) Blocked by required conditions
Server CI / Generate Test Coverage (push) Blocked by required conditions
Server CI / Run mmctl tests (push) Blocked by required conditions
Server CI / Run mmctl tests (FIPS) (push) Blocked by required conditions
Server CI / Build mattermost server app (push) Blocked by required conditions
Web App CI / check-lint (push) Waiting to run
Web App CI / check-i18n (push) Blocked by required conditions
Web App CI / check-types (push) Blocked by required conditions
Web App CI / test (platform) (push) Blocked by required conditions
Web App CI / test (mattermost-redux) (push) Blocked by required conditions
Web App CI / test (channels shard 1/4) (push) Blocked by required conditions
Web App CI / test (channels shard 2/4) (push) Blocked by required conditions
Web App CI / test (channels shard 3/4) (push) Blocked by required conditions
Web App CI / test (channels shard 4/4) (push) Blocked by required conditions
Web App CI / upload-coverage (push) Blocked by required conditions
Web App CI / build (push) Blocked by required conditions
* MM-67279: Fix private channel enumeration via /mute slash command

Return the same error message when a user tries to mute a channel
they are not a member of as when the channel doesn't exist. This
prevents authenticated users from discovering private channels
by observing different error responses.

* update i18n

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2026-01-30 14:43:23 +00:00
Nick Misasi
90bdd6ae54
MM-67141 Update AI rewrite prompt guidance (#35011)
* Improve rewrite menu guidance

Keep AI rewrite prompts visible on focus and clarify the empty-state instruction.

* Apply suggestions from code review

* Apply suggestion from @nickmisasi

* Fix rewrite menu test assertions

Update test expectations to match component string values after defaultMessage changes. Fix syntax error with unterminated string and correct placeholder text expectation.

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2026-01-30 14:14:29 +00:00
Nick Misasi
fe4100956c
[MM-66581] Include some thread context in AI Rewrites prompt (#34931)
* Include last root, and most recent 10 posts in a thread with the rewrite system prompt

* Include user's names in the thread context for better reference

* Revert package-lock to master

* Fix tests
2026-01-30 09:14:06 -05:00
Alejandro García Montoro
1c1a445a3e
MM-67380: COALESCE Drafts.Type to the empty string if NULL (#35109)
Some checks are pending
API / build (push) Waiting to run
Server CI / Compute Go Version (push) Waiting to run
Server CI / Check mocks (push) Blocked by required conditions
Server CI / Check go mod tidy (push) Blocked by required conditions
Server CI / check-style (push) Blocked by required conditions
Server CI / Check serialization methods for hot structs (push) Blocked by required conditions
Server CI / Vet API (push) Blocked by required conditions
Server CI / Check migration files (push) Blocked by required conditions
Server CI / Generate email templates (push) Blocked by required conditions
Server CI / Check store layers (push) Blocked by required conditions
Server CI / Check mmctl docs (push) Blocked by required conditions
Server CI / Postgres with binary parameters (push) Blocked by required conditions
Server CI / Postgres (push) Blocked by required conditions
Server CI / Postgres (FIPS) (push) Blocked by required conditions
Server CI / Generate Test Coverage (push) Blocked by required conditions
Server CI / Run mmctl tests (push) Blocked by required conditions
Server CI / Run mmctl tests (FIPS) (push) Blocked by required conditions
Server CI / Build mattermost server app (push) Blocked by required conditions
Web App CI / check-lint (push) Waiting to run
Web App CI / check-i18n (push) Blocked by required conditions
Web App CI / check-types (push) Blocked by required conditions
Web App CI / test (platform) (push) Blocked by required conditions
Web App CI / test (mattermost-redux) (push) Blocked by required conditions
Web App CI / test (channels shard 1/4) (push) Blocked by required conditions
Web App CI / test (channels shard 2/4) (push) Blocked by required conditions
Web App CI / test (channels shard 3/4) (push) Blocked by required conditions
Web App CI / test (channels shard 4/4) (push) Blocked by required conditions
Web App CI / upload-coverage (push) Blocked by required conditions
Web App CI / build (push) Blocked by required conditions
When the Type column was added to the Drafts table, it did not add a
DEFAULT value, so we need to handle the NULL values for the pre-existing
rows.

Co-authored-by: Mattermost Build <build@mattermost.com>
2026-01-29 21:14:56 +01:00
Doug Lauder
7f6a98fd7a
MM-66789 Restrict log downloads to a root path for support packets (#35014)
* [MM-66789] Fix arbitrary file read vulnerability in advanced logging

  Add path validation to prevent reading files outside the logging root
  directory via GetAdvancedLogs (used in support packet generation).

  Security controls:
  - Validate file paths are within logging root before reading
  - Support MM_LOG_PATH environment variable to allow system admins
    to configure a custom logging root directory
  - Resolve symlinks to prevent bypass attacks
  - Detect and block path traversal attempts

  Also adds:
  - Audit logging for support packet generation
  - Config-time validation that logs errors for paths outside logging
    root (will become blocking in future version)
  - Comprehensive test coverage for path validation

* Update server/channels/app/platform/log_test.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix linter errors

* Update server/channels/api4/system.go

Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>

* Simplify unit tests for platform/log_test.go by moving some test logic to config/logger_test.go

* Fix unit tests requiring logging root to be set

* enforce LogSettings.FileLocation path validation; simplify path checking

* fix linter errors

* use dir in logging root for all unit test logging

* MM_LOG_PATH is set once, centrally, for all tests

* fix flaky test

* fix flaky test

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
2026-01-29 13:29:55 -05:00
Jesse Hallam
1346cf529a
MM-67274: Fix panic in getBrowserVersion with empty User-Agent version (#35098)
* MM-67274: Fix panic in getBrowserVersion with empty User-Agent version

Refactor getBrowserVersion to use a table-driven approach that
centralizes bounds checking, preventing panic when User-Agent strings
contain identifiers like "Mattermost Mobile/" with no version token.

* Refactor user agent tests to use structured test cases

Move expected values into the testUserAgent struct for clarity,
making it easier to see what each test case expects at a glance.
2026-01-29 13:12:35 -05:00
Alejandro García Montoro
7201f42d95
MM-67277: Add check to legacy hasher (#35092)
* Add check to legacy hasher

* Make the linter happy
2026-01-29 17:47:48 +01:00
Christopher Poile
168fb51666
[MM-67202] Validate auth method in account switch (#34981)
* fix account authorization type switch

* improve test clarity

* refactor tests for clarity
2026-01-29 16:14:19 +00:00
Catalin I. Tomai
1396ab967e merge with master 2026-01-29 16:30:14 +01:00
Catalin I. Tomai
3521ffde03 copy to clipboard fix 2026-01-29 16:15:45 +01:00
Ben Cooke
36173a4948
Use one timeout config for requests to translation providers (#34957)
Some checks are pending
API / build (push) Waiting to run
Server CI / Compute Go Version (push) Waiting to run
Server CI / Check mocks (push) Blocked by required conditions
Server CI / Check go mod tidy (push) Blocked by required conditions
Server CI / check-style (push) Blocked by required conditions
Server CI / Check serialization methods for hot structs (push) Blocked by required conditions
Server CI / Vet API (push) Blocked by required conditions
Server CI / Check migration files (push) Blocked by required conditions
Server CI / Generate email templates (push) Blocked by required conditions
Server CI / Check store layers (push) Blocked by required conditions
Server CI / Check mmctl docs (push) Blocked by required conditions
Server CI / Postgres with binary parameters (push) Blocked by required conditions
Server CI / Postgres (push) Blocked by required conditions
Server CI / Postgres (FIPS) (push) Blocked by required conditions
Server CI / Generate Test Coverage (push) Blocked by required conditions
Server CI / Run mmctl tests (push) Blocked by required conditions
Server CI / Run mmctl tests (FIPS) (push) Blocked by required conditions
Server CI / Build mattermost server app (push) Blocked by required conditions
Web App CI / check-lint (push) Waiting to run
Web App CI / check-i18n (push) Blocked by required conditions
Web App CI / check-types (push) Blocked by required conditions
Web App CI / test (platform) (push) Blocked by required conditions
Web App CI / test (mattermost-redux) (push) Blocked by required conditions
Web App CI / test (channels shard 1/4) (push) Blocked by required conditions
Web App CI / test (channels shard 2/4) (push) Blocked by required conditions
Web App CI / test (channels shard 3/4) (push) Blocked by required conditions
Web App CI / test (channels shard 4/4) (push) Blocked by required conditions
Web App CI / upload-coverage (push) Blocked by required conditions
Web App CI / build (push) Blocked by required conditions
2026-01-29 10:00:22 -05:00
Alejandro García Montoro
2b075c9b74
MM-65970: New way to build routes in Client4 (#34499)
* Add Client4 route building functions

* Make DoAPIRequestWithHeaders add the API URL

This makes it consistent with the other DoAPIXYZ functions, which all
prepend the provided URL with the client's API URL.

* Use the new route building logic in Client4

* Address review comments

- clean renamed to cleanSegment
- JoinRoutes and JoinSegments joined in Join
- newClientRoute uses Join

* Fix new routes from merge

* Remove unused import

* Simplify error handling around clientRoute (#34870)

---------

Co-authored-by: Jesse Hallam <jesse@mattermost.com>
Co-authored-by: Jesse Hallam <jesse.hallam@gmail.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
2026-01-29 14:26:47 +00:00
Catalin I. Tomai
9fb6109233 update url handling logic 2026-01-29 15:02:31 +01:00
Jesse Hallam
5d787969c2
MM-67268: Fix SSRF bypass via IPv4-mapped IPv6 literals (#35097)
Canonicalize IPv4-mapped IPv6 addresses (e.g., ::ffff:127.0.0.1) to
their native IPv4 form in IsReservedIP before checking against reserved
IP ranges. This prevents attackers from bypassing SSRF protections by
using IPv4-mapped IPv6 literals to access internal services.
2026-01-29 14:36:47 +01:00
Catalin I. Tomai
0faf656c64 fix url handling after ai translation 2026-01-29 14:08:09 +01:00
Catalin I. Tomai
9378d7ddef merge with master 2026-01-29 12:35:33 +01:00
Ben Cooke
4195b8bc5c
Metrics for Autotranslations (#34900) 2026-01-29 05:46:45 -05:00
Catalin I. Tomai
7e3a0efd8e fix tests 2026-01-29 11:43:01 +01:00
Catalin I. Tomai
2878476f26 update markdown export 2026-01-29 11:27:59 +01:00
Alejandro García Montoro
62df0b0417
Update the FIPS flavour of Playbooks to v2.6.2 (#35096)
Some checks are pending
API / build (push) Waiting to run
Server CI / Compute Go Version (push) Waiting to run
Server CI / Check mocks (push) Blocked by required conditions
Server CI / Check go mod tidy (push) Blocked by required conditions
Server CI / check-style (push) Blocked by required conditions
Server CI / Check serialization methods for hot structs (push) Blocked by required conditions
Server CI / Vet API (push) Blocked by required conditions
Server CI / Check migration files (push) Blocked by required conditions
Server CI / Generate email templates (push) Blocked by required conditions
Server CI / Check store layers (push) Blocked by required conditions
Server CI / Check mmctl docs (push) Blocked by required conditions
Server CI / Postgres with binary parameters (push) Blocked by required conditions
Server CI / Postgres (push) Blocked by required conditions
Server CI / Postgres (FIPS) (push) Blocked by required conditions
Server CI / Generate Test Coverage (push) Blocked by required conditions
Server CI / Run mmctl tests (push) Blocked by required conditions
Server CI / Run mmctl tests (FIPS) (push) Blocked by required conditions
Server CI / Build mattermost server app (push) Blocked by required conditions
Web App CI / check-lint (push) Waiting to run
Web App CI / check-i18n (push) Blocked by required conditions
Web App CI / check-types (push) Blocked by required conditions
Web App CI / test (platform) (push) Blocked by required conditions
Web App CI / test (mattermost-redux) (push) Blocked by required conditions
Web App CI / test (channels shard 1/4) (push) Blocked by required conditions
Web App CI / test (channels shard 2/4) (push) Blocked by required conditions
Web App CI / test (channels shard 3/4) (push) Blocked by required conditions
Web App CI / test (channels shard 4/4) (push) Blocked by required conditions
Web App CI / upload-coverage (push) Blocked by required conditions
Web App CI / build (push) Blocked by required conditions
Automatic Merge
2026-01-29 08:53:28 +02:00
Catalin I. Tomai
89b8055a77 improvements 2026-01-29 00:56:57 +01:00
sabril
7417d07733
Test/RTL: Use userEvent as much as possible and remove unneeded jest.clearAllMocks() (#35070)
Some checks are pending
API / build (push) Waiting to run
Server CI / Compute Go Version (push) Waiting to run
Server CI / Check mocks (push) Blocked by required conditions
Server CI / Check go mod tidy (push) Blocked by required conditions
Server CI / check-style (push) Blocked by required conditions
Server CI / Check serialization methods for hot structs (push) Blocked by required conditions
Server CI / Vet API (push) Blocked by required conditions
Server CI / Check migration files (push) Blocked by required conditions
Server CI / Generate email templates (push) Blocked by required conditions
Server CI / Check store layers (push) Blocked by required conditions
Server CI / Check mmctl docs (push) Blocked by required conditions
Server CI / Postgres with binary parameters (push) Blocked by required conditions
Server CI / Postgres (push) Blocked by required conditions
Server CI / Postgres (FIPS) (push) Blocked by required conditions
Server CI / Generate Test Coverage (push) Blocked by required conditions
Server CI / Run mmctl tests (push) Blocked by required conditions
Server CI / Run mmctl tests (FIPS) (push) Blocked by required conditions
Server CI / Build mattermost server app (push) Blocked by required conditions
Web App CI / check-lint (push) Waiting to run
Web App CI / check-i18n (push) Blocked by required conditions
Web App CI / check-types (push) Blocked by required conditions
Web App CI / test (platform) (push) Blocked by required conditions
Web App CI / test (mattermost-redux) (push) Blocked by required conditions
Web App CI / test (channels shard 1/4) (push) Blocked by required conditions
Web App CI / test (channels shard 2/4) (push) Blocked by required conditions
Web App CI / test (channels shard 3/4) (push) Blocked by required conditions
Web App CI / test (channels shard 4/4) (push) Blocked by required conditions
Web App CI / upload-coverage (push) Blocked by required conditions
Web App CI / build (push) Blocked by required conditions
* use userEvent as much as possible then fireEvent only if needed

* remove unnecessary jest.clearAllMocks

* update comments
2026-01-29 00:52:24 +08:00
Christopher Poile
67b8c89508
MM-67130: Fix permalink preview permissions (#34909)
* remove permalink embeds when user loses access to orginating channel

* remove posts & embeds on team_leave event; simplify preview index.ts

* cleanup

* remove dead code

* more dead code elimination
2026-01-28 15:01:40 +00:00
Catalin I. Tomai
bdcbd604c4 fix i18n 2026-01-28 09:58:13 +01:00
Catalin I. Tomai
eeef09f3f5 address feature requests(1) 2026-01-28 09:51:26 +01:00
Catalin I. Tomai
44cd9d27fe add test docs 2026-01-28 02:39:36 +01:00
Catalin I. Tomai
e9225f00d8 address feature requests 2026-01-28 01:51:54 +01:00