[PR #6633] [PM-24380] fix: Correct and redact flight recorder hostname on logs #26115

Open
opened 2026-04-17 01:39:05 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/6633
Author: @aj-rosado
Created: 3/10/2026
Status: 🔄 Open

Base: mainHead: PM-24380/flight-recorder-redact-hostname


📝 Commits (9)

  • 81fc72d redacting hostname from flight recorder logs
  • 45c195a Redacting hostname when it matches a self-hosted hostname
  • b35e020 Merge branch 'main' into PM-24380/flight-recorder-redact-hostname
  • 78b2985 simplified method description
  • c2cd1f8 Merge branch 'main' into PM-24380/flight-recorder-redact-hostname
  • 4a711c8 using let instead of null validation
  • ee649db Merge branch 'main' into PM-24380/flight-recorder-redact-hostname
  • 189916a keeping BaseUrlProvider use only on the BaseUrlInterceptors.
  • 646e47e Using the environment url hosts from ServerConfigRepository to redact logs

📊 Changes

5 files changed (+207 additions, -6 deletions)

View changed files

📝 data/src/main/kotlin/com/bitwarden/data/manager/flightrecorder/FlightRecorderWriterImpl.kt (+18 -2)
📝 network/src/main/kotlin/com/bitwarden/network/core/NetworkResultCall.kt (+14 -3)
📝 network/src/main/kotlin/com/bitwarden/network/core/NetworkResultCallAdapter.kt (+2 -1)
network/src/main/kotlin/com/bitwarden/network/util/HostnameRedactionUtil.kt (+27 -0)
network/src/test/kotlin/com/bitwarden/network/util/HostnameRedactionUtilTest.kt (+146 -0)

📄 Description

🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-24380

📔 Objective

This aims two address different scenarios.

  1. On the network exception we are logging the cloud api when the user is self-hosted. This is caused because we are looking at the instance without the BaseUrlInterceptor having updated the url. So now we are checking on the NetworkResultCall if we should update the BaseUrl using the existing BaseUrlsProvider
  2. Replace the hostname from self-hosted instance on flight recorder logs in order to protect PII information from the logs.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/bitwarden/android/pull/6633 **Author:** [@aj-rosado](https://github.com/aj-rosado) **Created:** 3/10/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `PM-24380/flight-recorder-redact-hostname` --- ### 📝 Commits (9) - [`81fc72d`](https://github.com/bitwarden/android/commit/81fc72d4de88496d2469fac1e6206461223f362e) redacting hostname from flight recorder logs - [`45c195a`](https://github.com/bitwarden/android/commit/45c195a7d0f828bb4c19396b8a0f8855ddee7537) Redacting hostname when it matches a self-hosted hostname - [`b35e020`](https://github.com/bitwarden/android/commit/b35e020e4cd6600b91d346c3a6313bb7b4f5100a) Merge branch 'main' into PM-24380/flight-recorder-redact-hostname - [`78b2985`](https://github.com/bitwarden/android/commit/78b298512d5c6d3c6e54b00ea769746c0a57593a) simplified method description - [`c2cd1f8`](https://github.com/bitwarden/android/commit/c2cd1f823acd94c07462553680cb9c4a2cec05b2) Merge branch 'main' into PM-24380/flight-recorder-redact-hostname - [`4a711c8`](https://github.com/bitwarden/android/commit/4a711c80369790760c78a1b88e0939845753a3dc) using let instead of null validation - [`ee649db`](https://github.com/bitwarden/android/commit/ee649db64e1435f74100bb158210d4d52db330bd) Merge branch 'main' into PM-24380/flight-recorder-redact-hostname - [`189916a`](https://github.com/bitwarden/android/commit/189916a0102ac2f2d22c5d71ea397a9df5d905bb) keeping BaseUrlProvider use only on the BaseUrlInterceptors. - [`646e47e`](https://github.com/bitwarden/android/commit/646e47e6212719a34346e2ff378aac543bc00a22) Using the environment url hosts from ServerConfigRepository to redact logs ### 📊 Changes **5 files changed** (+207 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `data/src/main/kotlin/com/bitwarden/data/manager/flightrecorder/FlightRecorderWriterImpl.kt` (+18 -2) 📝 `network/src/main/kotlin/com/bitwarden/network/core/NetworkResultCall.kt` (+14 -3) 📝 `network/src/main/kotlin/com/bitwarden/network/core/NetworkResultCallAdapter.kt` (+2 -1) ➕ `network/src/main/kotlin/com/bitwarden/network/util/HostnameRedactionUtil.kt` (+27 -0) ➕ `network/src/test/kotlin/com/bitwarden/network/util/HostnameRedactionUtilTest.kt` (+146 -0) </details> ### 📄 Description ## 🎟️ Tracking https://bitwarden.atlassian.net/browse/PM-24380 ## 📔 Objective This aims two address different scenarios. 1. On the network exception we are logging the cloud api when the user is self-hosted. This is caused because we are looking at the instance without the `BaseUrlInterceptor` having updated the url. So now we are checking on the `NetworkResultCall` if we should update the BaseUrl using the existing `BaseUrlsProvider` 2. Replace the hostname from self-hosted instance on flight recorder logs in order to protect PII information from the logs. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-17 01:39:05 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#26115