mattermost-mobile-upstream/app/client/rest
Amy Blais aa47558a47
Some checks failed
ci / lint-typecheck (push) Has been cancelled
ci / detox-lint-typecheck (push) Has been cancelled
ci / test (push) Has been cancelled
MM-70606: Fix Edit Server pre-auth secret save on HTTPS-redirecting servers (#10252) (#10290)
* fix(MM-70606): send the pre-auth secret over HTTPS only and fix Edit Server save

- sanitizeUrl: useHttp no longer downgrades an explicit https:// URL, so
  getServerUrlAfterRedirect keeps an HTTPS redirect target and strips its
  query string.
- Send the pre-auth secret header only to https/wss URLs: REST client
  default headers, per-request headers, WebSocket, and the HEAD probe.
  The secret is still persisted for the server.
- Edit Server: try HTTPS first, then fall back to HTTP (as Add Server does).
- Edit Server: recreate and reconnect the WebSocket client after the
  secret changes, so the new secret is used without an app restart.

* fix(MM-70606): keep the persisted pre-auth secret on token refresh over HTTP

ClientTracking stores the secret in its own field. The token refresh in
doFetchWithTracking reads that field instead of the request header, which
is only set over TLS, so a refresh on an http:// server no longer resets
the saved secret.

* fix(MM-70606): clarify when the pre-auth secret header is removed

* test(MM-70606): cover the pre-auth header guard in NetworkManager.createClient

(cherry picked from commit c189ca9fdd)

Co-authored-by: Felipe Martin <812088+fmartingr@users.noreply.github.com>
2026-10-30 14:09:40 +02:00
..
access_control.test.ts Mm 68219 show placeholder for redacted files (#9719) 2026-10-15 15:59:13 -07:00
access_control.ts Mm 68219 show placeholder for redacted files (#9719) 2026-10-15 15:59:13 -07:00
apps.ts Request metrics improvements (#8420) 2025-01-16 13:55:29 -07:00
base.test.ts Fix link to image proxy and correct padding in image sizing on blocks (#9976) 2026-07-30 13:41:26 +02:00
base.ts [MM-70605][MM-70607] Scope pre-auth secret storage per server (#10149) (#10278) 2026-10-27 08:32:25 +02:00
categories.test.ts MM-59683 + more - Add tests to client/rest (#8447) 2025-01-07 08:23:28 -05:00
categories.ts Request metrics improvements (#8420) 2025-01-16 13:55:29 -07:00
channel_bookmark.test.ts fix: Product fixes to run e2e tests (#10081) 2026-08-26 16:12:37 +05:30
channel_bookmark.ts fix: Product fixes to run e2e tests (#10081) 2026-08-26 16:12:37 +05:30
channels.test.ts [MM-68255] Enable mobile support for Managed Categories (#9683) 2026-04-16 10:01:51 -04:00
channels.ts [MM-68255] Enable mobile support for Managed Categories (#9683) 2026-04-16 10:01:51 -04:00
constants.ts Fix case-insensitive pre-auth header check in doPing (#9577) 2026-03-17 12:07:07 +01:00
custom_profile_attributes.test.ts [MM-62701] [MM-62176]Edit custom profile attributes in user profile (#8557) 2025-02-19 15:51:59 +01:00
custom_profile_attributes.ts [MM-62565] DB only custom profile attributes and fields (#8739) 2025-04-09 15:35:27 +02:00
emojis.test.ts MM-59683 + more - Add tests to client/rest (#8447) 2025-01-07 08:23:28 -05:00
emojis.ts Remove watermelondb limitation on updating an already updated model (#7067) 2023-02-03 17:11:57 +02:00
ephemeral_mode.test.ts Mm 68296 audit ephemeral mode events (#10139) 2026-09-23 13:48:14 +02:00
ephemeral_mode.ts Mm 68296 audit ephemeral mode events (#10139) 2026-09-23 13:48:14 +02:00
error.ts feat: show pre-auth secret error on field on server create (#9102) 2025-09-17 08:04:28 +02:00
files.test.ts MM-69122: Add file element support to interactive dialogs (#9898) 2026-10-07 14:43:26 -05:00
files.ts MM-69122: Add file element support to interactive dialogs (#9898) 2026-10-07 14:43:26 -05:00
general.test.ts [MM-63728] Add license load metric to About screen (#8769) 2025-04-17 17:29:47 -03:00
general.ts [MM-63728] Add license load metric to About screen (#8769) 2025-04-17 17:29:47 -03:00
groups.test.ts Request metrics improvements (#8420) 2025-01-16 13:55:29 -07:00
groups.ts Request metrics improvements (#8420) 2025-01-16 13:55:29 -07:00
index.test.js [Gekidou] Fix & small refactor to the app entry logic and WS reconnection (#5937) 2022-02-09 12:49:37 -03:00
index.ts Mm 68219 show placeholder for redacted files (#9719) 2026-10-15 15:59:13 -07:00
integrations.test.ts MM-59683 + more - Add tests to client/rest (#8447) 2025-01-07 08:23:28 -05:00
integrations.ts Add Multiselect, Dynamic Select, Multiform, and Field Refresh Support for Interactive Dialogs (#9484) 2026-03-18 15:15:08 -06:00
nps.test.ts MM-59683 + more - Add tests to client/rest (#8447) 2025-01-07 08:23:28 -05:00
nps.ts Remove watermelondb limitation on updating an already updated model (#7067) 2023-02-03 17:11:57 +02:00
plugins.test.ts MM-59683 + more - Add tests to client/rest (#8447) 2025-01-07 08:23:28 -05:00
plugins.ts Remove watermelondb limitation on updating an already updated model (#7067) 2023-02-03 17:11:57 +02:00
posts.test.ts Mattermost Blocks (#9764) 2026-06-29 18:42:16 +02:00
posts.ts Mattermost Blocks (#9764) 2026-06-29 18:42:16 +02:00
preferences.test.ts Request metrics improvements (#8420) 2025-01-16 13:55:29 -07:00
preferences.ts Request metrics improvements (#8420) 2025-01-16 13:55:29 -07:00
properties.test.ts Classification Markings: Cached request timer and PSv2 Implementation (#9926) 2026-08-13 15:24:07 +03:00
properties.ts Classification Markings: Cached request timer and PSv2 Implementation (#9926) 2026-08-13 15:24:07 +03:00
scheduled_post.test.ts Feature schedule posts (#8509) 2025-04-14 22:08:59 +05:30
scheduled_post.ts Feature schedule posts (#8509) 2025-04-14 22:08:59 +05:30
teams.test.ts Add guest invites (#9288) 2025-12-11 17:21:18 +01:00
teams.ts Add guest invites (#9288) 2025-12-11 17:21:18 +01:00
threads.test.ts Request metrics improvements (#8420) 2025-01-16 13:55:29 -07:00
threads.ts Request metrics improvements (#8420) 2025-01-16 13:55:29 -07:00
tos.test.ts MM-59683 + more - Add tests to client/rest (#8447) 2025-01-07 08:23:28 -05:00
tos.ts Remove watermelondb limitation on updating an already updated model (#7067) 2023-02-03 17:11:57 +02:00
tracking.test.ts MM-70606: Fix Edit Server pre-auth secret save on HTTPS-redirecting servers (#10252) (#10290) 2026-10-30 14:09:40 +02:00
tracking.ts MM-70606: Fix Edit Server pre-auth secret save on HTTPS-redirecting servers (#10252) (#10290) 2026-10-30 14:09:40 +02:00
users.test.ts [MM-68986][MM-69203] Add module to collect Session Attributes from Mobile App (#9830) 2026-08-18 18:03:20 +00:00
users.ts [MM-68986][MM-69203] Add module to collect Session Attributes from Mobile App (#9830) 2026-08-18 18:03:20 +00:00