mattermost-mobile-upstream/app/managers
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
..
draft_upload_manager Mm 68219 show placeholder for redacted files (#9719) 2026-10-15 15:59:13 -07:00
ephemeral_mode_manager Mm 68293 ephemeral mode warnings (#10140) 2026-10-01 18:13:22 +02:00
intune_manager Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
performance_metrics_manager Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
security_manager On iOS, resuming after the 5-minute window showed no biometric prompt — (#10102) 2026-09-02 15:03:13 +08:00
session_attributes_manager Mm 68219 show placeholder for redacted files (#9719) 2026-10-15 15:59:13 -07:00
apps_manager.test.ts Enforce names for singleton imports (#8639) 2025-02-27 12:46:17 +01:00
apps_manager.ts Enforce names for singleton imports (#8639) 2025-02-27 12:46:17 +01:00
global_event_handler.test.ts Mm 68293 ephemeral mode warnings (#10140) 2026-10-01 18:13:22 +02:00
global_event_handler.ts [MM-68315] Add autorecovery for database corruptions (#9900) 2026-07-13 18:02:35 +02:00
integrations_manager.ts MM-69122: Add file element support to interactive dialogs (#9898) 2026-10-07 14:43:26 -05:00
network_manager.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
network_manager.ts MM-70606: Fix Edit Server pre-auth secret save on HTTPS-redirecting servers (#10252) (#10290) 2026-10-30 14:09:40 +02:00
network_performance_manager.test.ts feat(MM-65145): low connectivity manager (#9283) 2025-12-04 10:44:33 -07:00
network_performance_manager.ts feat(MM-65145): low connectivity manager (#9283) 2025-12-04 10:44:33 -07:00
redaction_revalidation_manager.test.ts Mm 68219 show placeholder for redacted files (#9719) 2026-10-15 15:59:13 -07:00
redaction_revalidation_manager.ts Mm 68219 show placeholder for redacted files (#9719) 2026-10-15 15:59:13 -07:00
session_manager.test.ts Mm 68296 audit ephemeral mode events (#10139) 2026-09-23 13:48:14 +02:00
session_manager.ts Mm 68296 audit ephemeral mode events (#10139) 2026-09-23 13:48:14 +02:00
websocket_manager.test.ts Mm 68219 show placeholder for redacted files (#9719) 2026-10-15 15:59:13 -07:00
websocket_manager.ts Mm 68219 show placeholder for redacted files (#9719) 2026-10-15 15:59:13 -07:00