Commit graph

60 commits

Author SHA1 Message Date
Eva Sarafianou
08087a1420
Update golang.org/x/crypto (#34838) 2026-01-05 16:09:22 +02:00
Carlos Garcia
a0326c91ac
[MM-66203] removes direct jaytaylor/html2text dependency (#34539)
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) Waiting to run
Web App CI / check-types (push) Waiting to run
Web App CI / test (push) Waiting to run
Web App CI / build (push) Waiting to run
* removes direct jaytaylor/html2text dependency

there is still some indirect dependency on the library preventing
to use latest tablewriter with a PR made to the outdated library
that should be monitored as stated in go.mod comments.

* makes variable not shadow outer one

* fixes typo and makes test fail on error

* uses current docconv dependency to generate plain text email content
2025-12-04 17:15:01 +01:00
Carlos Garcia
4ba7f7e16e
MM-66202: Migrate to aws-sdk-go-v2 (#34496)
* updated aws-sdk dependency to aws-sdk-go-v2

* simplify error handling in case of timeout errors

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2025-11-20 11:26:09 +01:00
Ben Schumacher
97dedb9de5
Migrate from gopkg.in/yaml.v3 to github.com/goccy/go-yaml (#34510)
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) Waiting to run
Web App CI / check-types (push) Waiting to run
Web App CI / test (push) Waiting to run
Web App CI / build (push) Waiting to run
Co-authored-by: Claude <noreply@anthropic.com>
2025-11-18 08:52:05 +01:00
Nick Misasi
0dc1830948
[Build 2025] AI Plugin Bridge (#34216)
* initial commit for POC of Plugin Bridge

* Updates

* POC for plugin bridge

* Updates from collaboration

* Fixes

* Refactor Plugin Bridge to use HTTP/REST instead of RPC

- Remove ExecuteBridgeCall hook and Context.SourcePluginId
- Implement HTTP-based bridge using existing PluginHTTP infrastructure
- Add CallPlugin API method with endpoint parameter instead of method name
- Update CallPluginBridge to construct HTTP POST requests
- Add proper headers: Mattermost-User-Id, Mattermost-Plugin-ID
- Use 'com.mattermost.server' as plugin ID for core server calls
- Update ai.go to use REST endpoint /inter-plugin/v1/completion
- Add comprehensive spec documentation in server/spec.md
- Add MIGRATION_GUIDE.md for plugin developers
- Fix 401/404 issues by setting correct headers and URL paths

* Improve Plugin Bridge security and architecture

- Create ServeInternalPluginRequest for internal plugin calls (core + plugin-to-plugin)
- Move header-setting logic from CallPluginBridge to ServeInternalPluginRequest
- Improve separation of concerns: business logic vs HTTP transport
- Add security documentation explaining header protection

Security Improvements:
- ServeInternalPluginRequest is NOT exposed as HTTP route (internal only)
- Headers (Mattermost-User-Id, Mattermost-Plugin-ID) are set by trusted server code
- External requests cannot spoof these headers (stripped by servePluginRequest)
- Core calls use 'com.mattermost.server' as plugin ID for authorization
- Plugin-to-plugin calls use real plugin ID (enforced by server)

Backward Compatibility:
- Keep ServeInterPluginRequest for existing API.PluginHTTP callers (deprecated)
- All tests pass

Docs:
- Update spec.md with security model explanation
- Update MIGRATION_GUIDE.md with correct header usage examples

* Space

* cursor please stop creating markdown files

* Fix style

* Fix i18n, linter

* REMOVE MARKDOWN

* Remove CallPlugin method from plugin API interface

Per review feedback, this method is no longer needed.

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

* Remove CallPlugin method implementation from PluginAPI

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

* fixes

* Add AI OpenAPI spec

* fix openapi spec

* Use agents client (#34225)

* Use agents client

* Remove default agent

* Fixes

* fix: modify system prompts to ensure JSON is being returned

* remove webapp changes

* Add feature flags for rewrites and ai bridge, clean up

* Remove comments that aren't helpful

* Fix i18n

* Remove rewrites

* Fix tests

* Fix i18n

* adjust i18n again

* Add back translations

* Remove leftover mock code

* remove model file

* Make the real substitutions

* Include a basic invokation of the client with noop to ensure build works

* Remove unneeded change

* Updates from review

* Fixes

* Use v1.5.0 of agents plugin

---------

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: Christopher Speller <crspeller@gmail.com>
Co-authored-by: Felipe Martin <me@fmartingr.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
2025-10-30 19:09:27 +00:00
Alejandro García Montoro
0b7b968087
Update dependencies (#34071)
* Update dependencies

* Undo hack needed by go-elasticsearch v8.18.0

See https://github.com/mattermost/mattermost/pull/31021 for more
information.

* Another breaking change in a minor version :)

* Remove old exclude rules

* Unify ES/OS tests when getting no documents

* Clarify weird assert on ES/OS common tests

* Bump dependencies now that archives v0.1.5 is out
2025-10-14 13:00:39 +02:00
Eva Sarafianou
3ac4a73c63
[MM-65837], [MM-65824] - Update Dependencies (#33972)
* Update github.com/mholt/archives

* Update github.com/spf13/viper

* make batch migration worker tests less flaky

---------

Co-authored-by: Jesse Hallam <jesse@mattermost.com>
2025-10-01 20:19:22 +00:00
Jesse Hallam
8cace74692
MM-64486: Remove telemetry (#33606)
* MM-64486: Remove telemetry

Remove telemetry from Mattermost. We're no longer relying on Rudder upstream, and no longer making use of this information.

* recover mock for SystemStore.Get

* Fix TestClearPushNotificationSync by adding missing SystemStore mock

The test was failing because the SystemStore mock was missing the Get()
method that's required by the ServerId() function. Added the missing mock
to return a StringMap with SystemServerId.

* fix mocking issue

* Remove now-unused telemetry and constants

* Remove "Disable telemetry events" debug setting

* Remove empty functions

* Remove most "Telemetry tracking removed" comments

* Remove remains of DataPrefetch telemetry

* Remove now-unused prop from InviteMembersButton

* Remove trackDotMenuEvent

* Remove some more leftover comments

* Remove lingering logic related to trackingLocation

* Remove now-unused argument from useCopyText

* Remove lingering telemetry references from PreparingWorkspace

* fixup Remove trackDotMenuEvent

* Remove lingering telemetry references from signup page and password check

* Update snapshots and fix test broken by my changes

* Fix unintended behavior change in thread list filtering

Remove handleSetFilter wrapper that was accidentally modified during
telemetry removal. The function was calling clear() when switching to
unread filter, which was not the original behavior. Use setFilter
directly instead, restoring the original functionality.

* Remove unused useOpenDowngradeModal hook

The useOpenDowngradeModal hook was not being used anywhere in the codebase.

* Remove unused expandableLink from useExpandOverageUsersCheck

The expandableLink return value was not being used by any components.

* Re-add missing TeamLinkClicked performance telemetry

The mark(Mark.TeamLinkClicked) call was accidentally removed from the
handleSwitch function. This telemetry is needed for Looker-based
performance tracking.

* drop LogSettings.VerboseDiagnostics

---------

Co-authored-by: Harrison Healey <harrisonmhealey@gmail.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
2025-09-04 18:46:18 +00:00
Agniva De Sarker
41e88b74ac
MM-61407: Remove Bleve (#33430)
https://mattermost.atlassian.net/browse/MM-61407

```release-note
NONE
```

* webapp i18n

```release-note
NONE
```

* Fix e2e tests

```release-note
NONE
```

* fix roles in e2e tests

```release-note
NONE
```

* some review comments

```release-note
NONE
```

* add back permissions to deprecated list

```release-note
NONE
```
2025-07-31 09:35:29 +05:30
Julien Tant
c90ee268df
Remove PDF library version constraint and update to latest (#31400)
Co-authored-by: Claude <noreply@anthropic.com>
2025-07-14 21:37:17 -07:00
Claudio Costa
05585e5388
Update gosaml2 to latest v0.10.0 (#31263) 2025-06-03 11:57:26 +02:00
Eva Sarafianou
c90dfa4895
Move to library archives (#31100)
* Move to library archives

* wrap the error with %w

Co-authored-by: Jesse Hallam <jesse.hallam@gmail.com>

* remove redundant format

---------

Co-authored-by: Jesse Hallam <jesse.hallam@gmail.com>
2025-06-02 09:21:37 +03:00
Jesse Hallam
b7012952c4
MM-62158: Final migration for GetMemberUsersNotInChannel and GetMemberUsersInTeam (#31237)
* upgrade mattermost/squirrel

* migrate GetMemberUsersInTeam

* migrate GetMemberUsersNotInChannel
2025-05-30 16:20:05 +00:00
Agniva De Sarker
79bf1c34db
MM-63217: Bump dependencies (#31021)
* MM-63217: Bump dependencies

Skip-Enterprise-PR: true

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

```release-note
NONE
```

* fix go.mod

```release-note
NONE
```

* fix test

```release-note
NONE
```
2025-05-29 13:08:00 +05:30
Ibrahim Serdar Acikgoz
a344b3225b
[MM-61756] Attribute Based Access Control - Phase 1 (#30785)
Attribute Based Access Control - Base
* MM-63662

* MM-63919

* MM-63954

* MM-63955 

* MM-63425

* MM-63426

* MM-63458

* MM-63459

* MM-63603

* MM-63845

* MM-64146

* MM-64199

* MM-64201

* MM-64233

* MM-64247

* MM-64268

---------

Co-authored-by: Harshil Sharma <harshilsharma63@gmail.com>
Co-authored-by: Pablo Andrés Vélez Vidal <pablovv2012@gmail.com>
Co-authored-by: abhijit-singh <abhijitsingh0702@gmail.com>
Co-authored-by: Harrison Healey <harrisonmhealey@gmail.com>
2025-05-15 11:33:08 +02:00
Ben Cooke
4af8acb702
update gosaml to match enterprise version (#31031) 2025-05-13 14:34:08 -04:00
Guillermo Vayá
5b68afe452
[MM-63837] Bump x/net version to 0.39 (#30843)
* bump x/net version to 0.39

* modules-tidy

* upgrade dependencies for public

* tidy

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2025-05-07 11:41:31 +02:00
David Krauser
94dcd9f311
Upgrade logr to v2.0.22 (#30827) 2025-04-28 10:20:42 -04:00
Claudio Costa
5b793ad11d
Update bep/imagemeta to latest v0.11.0 (#30670) 2025-04-15 07:26:24 -06:00
Claudio Costa
a219fbcfa1
Update golang-jwt/jwt dependency to latest (#30625) 2025-04-03 15:30:21 -06:00
Ibrahim Serdar Acikgoz
10b1f4c5ac
[MM-63428] add access control policy store (#30597) 2025-04-02 13:39:28 +02:00
Claudio Costa
f8e16780ef
[MM-63436] Replace Exif parser dependency (#30479)
* Replace Exif parser dependency

* Improve forward seeking logic

* Fix linting

* Stop decoding upon finding tag

* Use latest version of imagemeta dependency

* Don't skip TIFF reader tests

* Log improvements

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2025-04-01 13:57:43 -06:00
Agniva De Sarker
c4718e4542
MM-60211: Bump dependencies (#30005)
https://mattermost.atlassian.net/browse/MM-60211
```release-note
NONE
```

Co-authored-by: Mattermost Build <build@mattermost.com>
2025-02-06 21:48:08 +05:30
Claudio Costa
316cde2569
[MM-62191] Remove disintegration/imaging dependency (#29657)
* Remove disintegration/imaging dependency

* Simplify FillCenter logic

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2025-02-03 11:04:00 +05:30
Jesús Espino
f1acdce42c
Removing opentracing (#29965)
* Removing opentracing

* Fixing CI
2025-01-29 07:45:13 +01:00
Agniva De Sarker
833578741d
Improve Redis failure modes (#29405)
While investigating code paths during
Redis downtime, I found out that the library
by default retries indefinitely for read commmands.

This leads to it being stuck in a loop
while trying to read anything from Redis.
We fix that by disabling retry.

Secondly, we adjust the ConnWriteTimeout
value slightly from its default of 10s
which is a bit too high for normal working
conditions.

Ref: https://github.com/redis/rueidis/issues/680
```release-note
NONE
```
2024-12-03 09:34:47 +05:30
Agniva De Sarker
65ed87bda0
Move Elasticsearch to source available 🎉 🎉 (#29015)
* Move Elasticsearch to source available
2024-11-06 09:26:54 +05:30
Alejandro García Montoro
9b368b9214
MM58746: Bump yuin/goldmark dependency (#28250)
* Bump yuin/goldmark dependency to latest version

* Add docs to modules-tidy make rule

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2024-09-20 12:08:35 +02:00
Agniva De Sarker
75ed2860ac
MM-59934: Add Redis to CI and other improvements (#28164)
- Update library version.
- Added MaxFlush delay to help reduce CPU usage.
- Fall back to LRU cache for the caches which use SCAN.
- Added mattermost-redis and running for all api layer
tests in Postgres.

https://mattermost.atlassian.net/browse/MM-59934
```release-note
NONE
```
2024-09-18 19:13:44 +05:30
Agniva De Sarker
540febd866
MM-56876: Redis: first introduction (#27752)
```release-note
NONE
```

---------

Co-authored-by: Jesús Espino <jespinog@gmail.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
2024-08-06 09:28:41 +05:30
Agniva De Sarker
a7210dff01
MM-57289: Bump dependencies (#27734)
https://mattermost.atlassian.net/browse/MM-57289
```release-note
NONE
```
2024-07-25 19:26:40 +05:30
Agniva De Sarker
177389d224
MM-53962: Adding ES8 dependency (#24399)
* Adding ES8 dependency

```release-note
NONE
```


Co-authored-by: Mattermost Build <build@mattermost.com>
2024-07-11 13:13:31 +05:30
Christopher Poile
9b2f20210b
[MM-56339] Audit logs: on login add UserId and SessionId to audit's Actor field (#27446)
* on login add UserId and SessionId to audit's Actor field to match logout

* lint

* simplify to add only userId and sessionId

* AddToEventActor -> AddUser/SessionToEventActor

* fill in missing session data when logging the audit record

* why did it bump that? reverting.

* make modules-tidy

* trigger build

* add more context to the comment
2024-07-08 18:56:54 -04:00
Doug Lauder
a3bc73c1dc
MM-58253 Ensure remotes can only update users belonging to them (#27290)
* - ensure new users get correct remoteID
- ensure remotes can only update users belonging to them
- ensure user remoteIDs cannot be changed once set

* make modules-tidy

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2024-06-06 10:28:02 -04:00
Harshil Sharma
2e96a3f1e7
Fixded go modules by modules-tidy (#26558) 2024-03-22 11:59:54 +05:30
Alejandro García Montoro
2690e1322a
Update dependencies (#26324)
* make update-dependencies

* cd public; go get -u ./...; go mod tidy
2024-02-29 13:19:43 +01:00
Catena cyber
61b1f26411
Bump golang.org/x/image dependency (#25965) 2024-01-30 08:11:35 +05:30
Claudio Costa
7d43712daa
[MM-54984] Update code.sajari.com/docconv to latest v2 (#25975)
* Update code.sajari.com/docconv to latest v2

* go mod tidy
2024-01-23 09:40:57 -06:00
Agniva De Sarker
b88a848c90
MM-53676: Bump dependencies (#25744)
https://mattermost.atlassian.net/browse/MM-53676
```release-note
NONE
```
2023-12-20 19:44:50 +05:30
Ibrahim Serdar Acikgoz
62a359299a
bump the server/public module revision to an existing commit (#25701) 2023-12-13 14:45:09 +01:00
Ben Schumacher
e99ded1635
[MM-55480] Update logr to v2.0.21 (#25431) 2023-11-23 10:30:08 +01:00
Claudio Costa
c516d5cb15
[MM-55164] Fix deadlock on shutdown due to stuck goroutine (#25227)
* Update code.sajari.com/docconv

* go mod tidy
2023-11-06 11:00:58 -06:00
Ben Schumacher
22c9c80cd2
[MM-54929] Revert "Remove unnecessary mmctl enterprise deps (#24395)" (#25063)
* Revert "Remove unnecessary mmctl enterprise deps (#24395)"

This reverts commit 32512d35fb.

* Add comment
2023-10-24 10:51:38 +02:00
Devin Binnie
89492a6a46
[MM-53428] Delete empty drafts on upsert (#24046)
* [MM-53428] Delete empty drafts on upsert

* Add migrations to fix existing drafts

* Fix CI

* Delete empty drafts entirely from the DB

* Fix lint

* Implement batch migration for deleting drafts

* Missing store layers

* Add updated mock

* Remove unnecessary test

* PR feedback

* Add check for cluster migration

* Fix MySQL

* Don't check for len<2

* Bit of PR feedback

* Use query builder for parameters

* PR feedback

* More PR feedback

* Merge'd

* unit test GetLastCreateAtAndUserIdValuesForEmptyDraftsMigration

* simplified builder interface

* fix DeleteEmptyDraftsByCreateAtAndUserId for MySQL

* rework as batch migration worker

* fix typo

* log ip address on version mismatches too

* simplify reset semantics

* remove trace log in favour of low spam

* document parameters for clarity

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Jesse Hallam <jesse.hallam@gmail.com>
2023-10-12 10:52:10 -04:00
Ben Schumacher
e4fa6200c3
[MM-45309] Replace github.com/mattermost/gziphandler with github.com/klauspost/compress/gzhttp (#24293) 2023-10-12 08:27:31 +02:00
Agniva De Sarker
3dd9e3715c
Goodbye, GraphQL (#24827)
```release-note
NONE
```
2023-10-12 09:47:35 +05:30
Ibrahim Serdar Acikgoz
53a0f8da27
Add limiting ability to log fields (#24251) 2023-09-28 19:28:40 +03:00
Ibrahim Serdar Acikgoz
0e84ccb383
Bump Go version to v1.20 (#24439) 2023-09-07 13:06:18 +03:00
M-ZubairAhmed
2789ee4dae
Go Mod Tidy on v9 (#24473) 2023-09-05 14:08:06 +02:00
Agniva De Sarker
32512d35fb
Remove unnecessary mmctl enterprise deps (#24395)
```release-note
NONE
```
2023-08-31 10:32:28 +02:00