[PR #1067] [MERGED] Fix Host matching of androidapp:// URIs #15480

Closed
opened 2026-04-15 01:45:14 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/1067
Author: @capntrips
Created: 9/14/2020
Status: Merged
Merged: 5/17/2021
Merged by: @mpbw2

Base: masterHead: master


📝 Commits (1)

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 src/Core/Utilities/CoreHelpers.cs (+1 -1)

📄 Description

This fixes bitwarden/mobile#967.

The issue is that during comparison, if the URIs don't match http:// or https://, http:// is prepended to the URI, and subsequent calls to uri.Host always return androidapp.

This change simply avoids prepending http:// in the case where a protocol is defined. It might make sense to use a regular expression to avoid the edge case of matching that pattern later in the URL.


🔄 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/1067 **Author:** [@capntrips](https://github.com/capntrips) **Created:** 9/14/2020 **Status:** ✅ Merged **Merged:** 5/17/2021 **Merged by:** [@mpbw2](https://github.com/mpbw2) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (1) - [`d1c70af`](https://github.com/bitwarden/android/commit/d1c70aff5a5ec08264ddd281b6e4be0ee3f53fd8) fixes bitwarden/mobile#967 ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/Core/Utilities/CoreHelpers.cs` (+1 -1) </details> ### 📄 Description This fixes bitwarden/mobile#967. The issue is that [during comparison](https://github.com/bitwarden/mobile/blob/ce965ba5e1b71ac9e3ea98bdf7568d7f8830365a/src/Core/Services/CipherService.cs#L378-L379), if the URIs don't match `http://` or `https://`, `http://` is prepended to the URI, and subsequent calls to `uri.Host` always return `androidapp`. This change simply avoids prepending `http://` in the case where a protocol is defined. It might make sense to use a regular expression to avoid the edge case of [matching that pattern later in the URL](https://stackoverflow.com/a/43283492/434343). --- <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-15 01:45:14 -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#15480