mattermost/server/channels/api4
Nick Misasi 5d3a04760b
[MM-67605] Add DCR redirect URI allowlist for OAuth DCR (#35291)
* [MM-67605] Add DCR redirect URI allowlist enforcement

Introduce ServiceSettings.DCRRedirectURIAllowlist with glob-based validation and enforce it during OAuth dynamic client registration to block unapproved redirect URIs. Add System Console wiring and tests for config validation, wildcard matching semantics, API error behavior, and localhost wildcard support.

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

* Fix pre-commit checks: TypeScript type assertion, gofmt, and regenerate CI artifacts

- admin_definition_dcr_allowlist.test.tsx: Add AdminDefinitionSettingInput type assertion for 'multiple' property
- oauth_dcr_test.go: Fix comment spacing (gofmt)
- Regenerate mocks, go.sum, gen-serialized, mmctl-docs per CI requirements

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

* Revert unnecessary pre-commit regenerations

Revert mmctl docs, mocks, go.sum, and gen-serialized to master. Keep only
the TypeScript and gofmt fixes from the previous commit.

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

* Fix import order in admin_definition_dcr_allowlist.test.tsx

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

* Fix i18n

* Update server/public/model/oauth_dcr.go

Co-authored-by: Eva Sarafianou <eva.sarafianou@gmail.com>

* Fix

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Eva Sarafianou <eva.sarafianou@gmail.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
2026-02-19 01:06:08 +00:00
..
access_control.go [MM-66836] Integrate PropertyAccessService into API and app layers (#34818) 2026-02-06 18:06:51 -05:00
access_control_local.go [MM-67126] Deprecate UpdateAccessControlPolicyActiveStatus API in favor of new one (#34940) 2026-01-27 15:49:08 +01:00
access_control_test.go [MM-67126] Deprecate UpdateAccessControlPolicyActiveStatus API in favor of new one (#34940) 2026-01-27 15:49:08 +01:00
agents.go Autotranslations MVP (#34696) 2026-01-26 17:05:34 -05:00
api.go [MM-66359] Recaps MVP (#34337) 2026-01-13 11:59:22 -05:00
apitestlib.go [MM-67140] Added session validation on logout (#34959) 2026-02-10 15:12:14 -05:00
apitestlib_test.go Fix errcheck linter errors in helpers (#31578) 2025-11-12 13:00:51 +01:00
audit_logging.go use consts for audit events (#33433) 2025-07-16 10:17:03 +05:30
bot.go use consts for audit events (#33433) 2025-07-16 10:17:03 +05:30
bot_local.go Replace Hard-coded HTTP Verbs with Constants (#27219) 2024-07-15 08:52:03 -06:00
bot_test.go Fix errcheck linter errors in helpers (#31578) 2025-11-12 13:00:51 +01:00
brand.go use consts for audit events (#33433) 2025-07-16 10:17:03 +05:30
brand_test.go Fix errcheck linter errors in helpers (#31578) 2025-11-12 13:00:51 +01:00
channel.go Add the ability to patch channel autotranslations (#35078) 2026-02-06 18:19:06 +01:00
channel_bookmark.go Add audits for accessing posts without membership (#31266) 2026-01-20 10:38:27 +01:00
channel_bookmark_test.go Fix errcheck linter errors in helpers (#31578) 2025-11-12 13:00:51 +01:00
channel_category.go use consts for audit events (#33433) 2025-07-16 10:17:03 +05:30
channel_category_test.go Fix errcheck linter errors in helpers (#31578) 2025-11-12 13:00:51 +01:00
channel_common_teams_test.go MM-66424: Improve team filtering in common teams API (#34454) 2025-12-15 15:06:48 -04:00
channel_local.go [MM-64900] Migrate to use request.CTX instead of context.Context (#33541) 2025-09-18 16:14:24 +02:00
channel_test.go Add the ability to patch channel autotranslations (#35078) 2026-02-06 18:19:06 +01:00
cloud.go [MM-67021] Fix 500 errors on check-cws-connection in non-Cloud environments (#34786) 2026-02-02 13:41:14 +00:00
cloud_test.go [MM-67021] Fix 500 errors on check-cws-connection in non-Cloud environments (#34786) 2026-02-02 13:41:14 +00:00
cluster.go [MM-29049] Fix remaining errcheck errors in app, api4 and web package (#31307) 2025-06-06 07:44:43 +02:00
cluster_test.go Fix errcheck linter errors in helpers (#31578) 2025-11-12 13:00:51 +01:00
command.go Add audits for accessing posts without membership (#31266) 2026-01-20 10:38:27 +01:00
command_help_test.go Fix errcheck linter errors in helpers (#31578) 2025-11-12 13:00:51 +01:00
command_local.go use consts for audit events (#33433) 2025-07-16 10:17:03 +05:30
command_test.go Integration permission management changes (#34421) 2025-11-13 11:12:30 +00:00
commands_test.go Fix errcheck linter errors in helpers (#31578) 2025-11-12 13:00:51 +01:00
compliance.go use consts for audit events (#33433) 2025-07-16 10:17:03 +05:30
config.go [MM-66789] Restrict ImportSettings.Directory changes via API and add validation (#34653) 2026-01-06 16:30:07 +00:00
config_local.go MM-64807: Deprecate format parameter in client config endpoint (#33605) 2025-08-20 12:15:11 -03:00
config_test.go [MM-67140] Added session validation on logout (#34959) 2026-02-10 15:12:14 -05:00
content_flagging.go Add audits for accessing posts without membership (#31266) 2026-01-20 10:38:27 +01:00
content_flagging_test.go Bor post disable flagging (#34759) 2025-12-22 12:25:54 +05:30
cors_test.go Fix errcheck linter errors in helpers (#31578) 2025-11-12 13:00:51 +01:00
custom_profile_attributes.go [MM-66836] Integrate PropertyAccessService into API and app layers (#34818) 2026-02-06 18:06:51 -05:00
custom_profile_attributes_local.go Adds value endpoints to local mode (#33950) 2025-09-26 10:57:13 +02:00
custom_profile_attributes_test.go [MM-66836] Integrate PropertyAccessService into API and app layers (#34818) 2026-02-06 18:06:51 -05:00
data_retention.go use consts for audit events (#33433) 2025-07-16 10:17:03 +05:30
data_retention_test.go Fix errcheck linter errors in helpers (#31578) 2025-11-12 13:00:51 +01:00
doc.go Add comprehensive documentation for server/channels layers (#33449) 2025-07-22 11:53:42 +02:00
drafts.go Add audits for accessing posts without membership (#31266) 2026-01-20 10:38:27 +01:00
drafts_test.go Fix errcheck linter errors in helpers (#31578) 2025-11-12 13:00:51 +01:00
elasticsearch.go use consts for audit events (#33433) 2025-07-16 10:17:03 +05:30
elasticsearch_test.go Fix errcheck linter errors in helpers (#31578) 2025-11-12 13:00:51 +01:00
emoji.go use consts for audit events (#33433) 2025-07-16 10:17:03 +05:30
emoji_test.go Fix errcheck linter errors in helpers (#31578) 2025-11-12 13:00:51 +01:00
export.go use consts for audit events (#33433) 2025-07-16 10:17:03 +05:30
export_local.go Replace Hard-coded HTTP Verbs with Constants (#27219) 2024-07-15 08:52:03 -06:00
export_test.go Fix errcheck linter errors in helpers (#31578) 2025-11-12 13:00:51 +01:00
file.go feat: pluginapi: filewillbedownloaded / sendtoastmessage (#34596) 2026-02-16 17:10:39 +01:00
file_test.go feat: pluginapi: filewillbedownloaded / sendtoastmessage (#34596) 2026-02-16 17:10:39 +01:00
group.go Fix permissions in GetGroupsByNames (#35119) 2026-02-09 10:13:48 +00:00
group_local.go Fixed errcheck issues in server/channels/api4/group_local.go (#28417) 2024-10-08 10:47:01 +02:00
group_test.go Fix permissions in GetGroupsByNames (#35119) 2026-02-09 10:13:48 +00:00
handlers.go MM-66886 Add rate limiting to login endpoint (#34943) 2026-02-13 10:16:24 -08:00
handlers_test.go Fix errcheck linter errors in helpers (#31578) 2025-11-12 13:00:51 +01:00
helpers.go Mono repo -> Master (#22553) 2023-03-22 17:22:27 -04:00
hosted_customer.go [MM-67030] Remove newsletter signup and replace with terms/privacy agreement (#34801) 2026-01-23 18:24:27 +00:00
image.go Fully deprecate /api/v4/image endpoint when image proxy is disabled (#27595) 2024-08-05 12:33:09 +02:00
image_test.go Fix errcheck linter errors in helpers (#31578) 2025-11-12 13:00:51 +01:00
import.go use consts for audit events (#33433) 2025-07-16 10:17:03 +05:30
import_local.go MMCTL: Add import delete cmd for removing the import files (#29764) 2025-06-10 12:06:38 +02:00
import_test.go Fix errcheck linter errors in helpers (#31578) 2025-11-12 13:00:51 +01:00
integration_action.go Add audits for accessing posts without membership (#31266) 2026-01-20 10:38:27 +01:00
integration_action_test.go Fix errcheck linter errors in helpers (#31578) 2025-11-12 13:00:51 +01:00
ip_filtering.go use consts for audit events (#33433) 2025-07-16 10:17:03 +05:30
ip_filtering_test.go Fix errcheck linter errors in helpers (#31578) 2025-11-12 13:00:51 +01:00
job.go use consts for audit events (#33433) 2025-07-16 10:17:03 +05:30
job_local.go [MM-63556] mmctl: Add compliance export download cmd (#30576) 2025-06-24 16:27:54 -04:00
job_test.go Fix errcheck linter errors in helpers (#31578) 2025-11-12 13:00:51 +01:00
ldap.go [MM-64320] Remove deprecated include_removed_members option in api/v4/ldap/sync (#31121) 2025-07-17 12:35:08 +02:00
ldap_local.go Replace Hard-coded HTTP Verbs with Constants (#27219) 2024-07-15 08:52:03 -06:00
ldap_test.go Fix errcheck linter errors in helpers (#31578) 2025-11-12 13:00:51 +01:00
license.go MM-63368: Remove MySQL (#33458) 2025-07-22 20:40:55 +05:30
license_local.go [MM-67114] Add mmctl license get command (#34878) 2026-02-10 08:26:59 +01:00
license_test.go Fix errcheck linter errors in helpers (#31578) 2025-11-12 13:00:51 +01:00
limits.go Message History Limits in Entry Edition (#33831) 2025-09-10 22:52:19 -04:00
limits_test.go Fix errcheck linter errors in helpers (#31578) 2025-11-12 13:00:51 +01:00
main_test.go MM-63368: Remove MySQL (#33458) 2025-07-22 20:40:55 +05:30
metrics.go MM-60283 Add standard response and API docs to /client_perf API (#28124) 2024-09-10 21:11:05 +00:00
metrics_test.go Fix errcheck linter errors in helpers (#31578) 2025-11-12 13:00:51 +01:00
notify_admin.go [MM-54024] Handle JSON nulls when unmarshalling in api4 (#24656) 2023-10-05 19:25:59 +05:30
notify_admin_test.go Fix errcheck linter errors in helpers (#31578) 2025-11-12 13:00:51 +01:00
oauth.go [MM-67605] Add DCR redirect URI allowlist for OAuth DCR (#35291) 2026-02-19 01:06:08 +00:00
oauth_test.go [MM-67605] Add DCR redirect URI allowlist for OAuth DCR (#35291) 2026-02-19 01:06:08 +00:00
outgoing_oauth_connection.go Integration permission management changes (#34421) 2025-11-13 11:12:30 +00:00
outgoing_oauth_connection_test.go Integration permission management changes (#34421) 2025-11-13 11:12:30 +00:00
permission.go errcheck issues fixed (#28475) 2024-10-04 19:12:32 +02:00
permissions_test.go Fix errcheck linter errors in helpers (#31578) 2025-11-12 13:00:51 +01:00
plugin.go use consts for audit events (#33433) 2025-07-16 10:17:03 +05:30
plugin_local.go Replace Hard-coded HTTP Verbs with Constants (#27219) 2024-07-15 08:52:03 -06:00
plugin_test.go Fix errcheck linter errors in helpers (#31578) 2025-11-12 13:00:51 +01:00
post.go MM-67312: Restrict Burn-on-Read for self DMs and bot users (#35116) 2026-02-12 14:10:05 -05:00
post_create_test.go Fix errcheck linter errors in helpers (#31578) 2025-11-12 13:00:51 +01:00
post_local.go use consts for audit events (#33433) 2025-07-16 10:17:03 +05:30
post_test.go MM-67055: Fix permalink embeds in WebSocket messages (#34893) 2026-01-23 16:11:16 -05:00
post_utils.go MM-67312: Restrict Burn-on-Read for self DMs and bot users (#35116) 2026-02-12 14:10:05 -05:00
preference.go Add audits for accessing posts without membership (#31266) 2026-01-20 10:38:27 +01:00
preference_local.go MM-56819: Introduce --local mode in MMCTL to handle user preferences. (#26972) 2024-09-09 14:12:22 +02:00
preference_test.go Fix errcheck linter errors in helpers (#31578) 2025-11-12 13:00:51 +01:00
reaction.go Add audits for accessing posts without membership (#31266) 2026-01-20 10:38:27 +01:00
reaction_test.go Fix errcheck linter errors in helpers (#31578) 2025-11-12 13:00:51 +01:00
recap.go [MM-67160] Add audit logging for recap API endpoints (#34929) 2026-01-19 13:46:43 -05:00
remote_cluster.go Add missing auditRec.Success calls; fix missing return on error. (#34954) 2026-01-27 23:07:53 +00:00
remote_cluster_test.go Fix errcheck linter errors in helpers (#31578) 2025-11-12 13:00:51 +01:00
report.go Add cursor-based Posts Reporting API for compliance and auditing (#34252) 2025-11-17 09:02:19 -07:00
report_test.go Add audits for accessing posts without membership (#31266) 2026-01-20 10:38:27 +01:00
role.go [MM-64900] Migrate to use request.CTX instead of context.Context (#33541) 2025-09-18 16:14:24 +02:00
role_local.go Replace Hard-coded HTTP Verbs with Constants (#27219) 2024-07-15 08:52:03 -06:00
role_test.go Use testify ElementsMatch instead of sorting slices before comparison (#34899) 2026-01-13 11:40:03 -04:00
saml.go use consts for audit events (#33433) 2025-07-16 10:17:03 +05:30
saml_test.go Fix errcheck linter errors in helpers (#31578) 2025-11-12 13:00:51 +01:00
scheduled_post.go MM-67312: Restrict Burn-on-Read for self DMs and bot users (#35116) 2026-02-12 14:10:05 -05:00
scheduled_post_test.go Guest cannot add file to post without upload_file permission (#34538) 2026-01-07 10:40:05 -04:00
scheme.go use consts for audit events (#33433) 2025-07-16 10:17:03 +05:30
scheme_test.go Fix errcheck linter errors in helpers (#31578) 2025-11-12 13:00:51 +01:00
shared_channel.go Add missing auditRec.Success calls; fix missing return on error. (#34954) 2026-01-27 23:07:53 +00:00
shared_channel_metadata_test.go Add audits for accessing posts without membership (#31266) 2026-01-20 10:38:27 +01:00
shared_channel_remotes_test.go Fix errcheck linter errors in helpers (#31578) 2025-11-12 13:00:51 +01:00
shared_channel_test.go Use testify ElementsMatch instead of sorting slices before comparison (#34899) 2026-01-13 11:40:03 -04:00
shared_channel_test_utils.go MM-57326: [Shared Channels] Message priority, acknowledgement and persistent notifications need to be synced (#30736) 2025-06-16 02:30:21 +02:00
status.go Ensure users status is set to offline when deactivated (#30900) 2025-05-29 10:41:14 +02:00
status_test.go Fix errcheck linter errors in helpers (#31578) 2025-11-12 13:00:51 +01:00
system.go MM-66789 Restrict log downloads to a root path for support packets (#35014) 2026-01-29 13:29:55 -05:00
system_local.go use consts for audit events (#33433) 2025-07-16 10:17:03 +05:30
system_test.go Fix errcheck linter errors in helpers (#31578) 2025-11-12 13:00:51 +01:00
team.go [MM-66827] Omit invite_id from team creation response based on permissions (#34693) 2026-01-05 13:48:19 +00:00
team_guest_test.go Fix errcheck linter errors in helpers (#31578) 2025-11-12 13:00:51 +01:00
team_local.go use consts for audit events (#33433) 2025-07-16 10:17:03 +05:30
team_test.go [MM-66827] Omit invite_id from team creation response based on permissions (#34693) 2026-01-05 13:48:19 +00:00
terms_of_service.go use consts for audit events (#33433) 2025-07-16 10:17:03 +05:30
terms_of_service_test.go Fix errcheck linter errors in helpers (#31578) 2025-11-12 13:00:51 +01:00
upload.go Add audits for accessing posts without membership (#31266) 2026-01-20 10:38:27 +01:00
upload_local.go Replace Hard-coded HTTP Verbs with Constants (#27219) 2024-07-15 08:52:03 -06:00
upload_test.go Fix errcheck linter errors in helpers (#31578) 2025-11-12 13:00:51 +01:00
usage.go [MM-60932] Fix errcheck issues in server/channels/api4/usage.go (#28641) 2024-10-09 11:53:25 +02:00
usage_test.go Fix errcheck linter errors in helpers (#31578) 2025-11-12 13:00:51 +01:00
user.go Mm 66813 sso callback metadata (#34955) 2026-02-16 11:07:02 -05:00
user_local.go [MM-64900] Migrate to use request.CTX instead of context.Context (#33541) 2025-09-18 16:14:24 +02:00
user_test.go Mm 66813 sso callback metadata (#34955) 2026-02-16 11:07:02 -05:00
user_viewmembers_test.go Fix errcheck linter errors in helpers (#31578) 2025-11-12 13:00:51 +01:00
webhook.go Add audits for accessing posts without membership (#31266) 2026-01-20 10:38:27 +01:00
webhook_local.go use consts for audit events (#33433) 2025-07-16 10:17:03 +05:30
webhook_test.go Integration permission management changes (#34421) 2025-11-13 11:12:30 +00:00
websocket.go [MM-64244] Add websocket disconnect reason metric (#31032) 2025-05-30 08:15:20 -04:00
websocket_norace_test.go Fix errcheck linter errors in helpers (#31578) 2025-11-12 13:00:51 +01:00
websocket_test.go Fix errcheck linter errors in helpers (#31578) 2025-11-12 13:00:51 +01:00