bitwarden / mobile

Retired Bitwarden mobile app for iOS and Android (MAUI/Xamarin).
https://bitwarden.com
GNU General Public License v3.0
149 stars 24 forks source link

Most recent Android app update broke "Host" URI detection #803

Open fkOCGEoSC9eLc9haLLxsl40n8cZPp70u1OZ49uy opened 4 years ago

fkOCGEoSC9eLc9haLLxsl40n8cZPp70u1OZ49uy commented 4 years ago

I have a few web sites where different services are available on different ports, each with their own username/password combination. In order for Bitwarden to recognize each interface differently, I have to set the URI detection method to "Host" for those web sites, this way https://mywebsite.com:8080 is recognized separately from https://mywebsite.com:9080 and https://mywebsite.com:7080.

This works well with the Chrome addon and it used to work well in the Android app, until the last update. Now, on Android, site entries in Bitwarden that have a "Host" type URI detection mechanism are no longer associated with the appropriate app. Bitwarden states that no site has been found for that web site. If I search for the right entry and select "Fill and save", it creates a new URI for that entry with the default "Base domain" detection, which doesn't see the difference between port numbers. If I change the URI detection for that new entry to "Host", then Bitwarden no longer associates it with the web site again.

Environment

63my6YlwlaR22R9kdMHhE0z6fnpyNYKHrhQ8C8K commented 4 years ago

This also happened after I updated the beta version of the Google play store today

In addition, I also lost my login data, because I was usually asked to enter my password, but this time I was asked to enter my account and password, just like I just installed the app.

Popup error:

exception message: an invalid request URI wasprovided. The request URI must enter be an absolute URI or BaseAddress mast be set.

update And I just tried it, the same version is 2.3.1, only the latest beta version has this problem, the release version does not have this problem, I hope this information is useful to you

fkOCGEoSC9eLc9haLLxsl40n8cZPp70u1OZ49uy commented 4 years ago

Just to be clear, I am not in the Beta and the release version I am running (2.3.1 (2257)) shows this issue.

h9BdNi6C0IzGLqlFQbU9SZSkJUHaeagY1EiCXLM commented 4 years ago

I had the same problem with latest beta build from the Play store and build 2276 from apkmirror and it didn't let me log-in, proceeded to delete cache and data and then the app crashed at start.

Uninstalled and installed build 2257 from apkmirror and works fine.

fQseLLqr02lAlpGcGsXJOPS9OnvGsGMx2Lp4eKe commented 4 years ago

I have the same problem.

mpbw2 commented 4 years ago

@IamGimli It looks like the autofill service isn't providing us with the port number, only https://mywebsite.com. That's why host matching isn't returning anything. It does however work with the autofill accessibility service - perhaps that's why you experienced it working previously?

Unfortunately I don't see anything we can do at this time. A potential workaround could be to use default matching to return all mywebsite.com items, and customize the name of each entry to make it identifiable. Not ideal, but less painful than manual copy/paste IMO.

fkOCGEoSC9eLc9haLLxsl40n8cZPp70u1OZ49uy commented 4 years ago

I don't understand what you're saying. Under Android Accessibility setting, the Bitwarden autofill service is still enabled. If that's supposed to work, I can confirm it doesn't.

As for "Unfortunately I don't see anything we can do at this time" does that mean that the loss of that functionality was intentional? If it wasn't, the changes that were made should be reversed until you figure out how not to cripple the app's functionality.

EDIT: Actually, after some more testing I can confirm that the Autofill Accessibility Service does still work, but only if the Autofill Service is first disabled. I guess the question now is what does the Autofill Service do that the Autofill Accessibility Service doesn't? Is it possible to recode the Autofill Service only to do what the Autofill Accessibility Service doesn't so that the capability of the Autofill Accessibility Service isn't crippled by the competing Autofill Service?

mpbw2 commented 4 years ago

@IamGimli That's correct, in recent builds the accessibility overlay yields to the autofill overlay since autofill is technically "the right one" and we don't want to unintentionally interfere with it. However that clearly doesn't help you since autofill fails to pass us the port numbers needed for host matching to work as expected. I'm re-opening this issue for my own visibility while I ponder options.

fkOCGEoSC9eLc9haLLxsl40n8cZPp70u1OZ49uy commented 4 years ago

Awesome, thank you!

paFCdrz3u6D70sL6SbBKaFGUdVPfdyKW929cqPj commented 2 years ago

I'm having the exact same problem on my Android phone.

For example, I have two services. One on http://192.168.1.198:8080/ and the other on http://192.168.1.198:8989/.

I have an entry for each of them in Bitwarden, with the "Host" URI detection type.

Lets say I go to http://192.168.1.198:8080/ on my PC (Chrome). The Bitwarden browser extension correctly identifies the host and the port, so it only returns the credentials for the 8080 service. However if I try to do the exact same thing on my Android phone (Tried both Chrome and Samsung Internet), I press the inline Bitwarden vault button in my keyboard to go to the vault, and it says: "There are no items in your vault for 192.168.1.198.".

So it looks like the port isn't being passed over to the Bitwarden app and I'm not sure how to fix this. I don't want to disable autofill as I find it very useful for everything else, it's just when I try to access these services that it becomes an issue.

Edit: Tried with both Autofill and Accessibility enabled, and then with only Autofill enabled and lastly with only Accessibility enabled. The port wasn't identified regardless of which method I tried.