Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does Lastpass know the current URL in Chrome

When browsing around in Chrome for Android, Lastpass pops up with suggestions if it recognizes the URL as one you have associated login details with.

How does it know which URL Chrome is looking at? I know that Lastpass makes use of Accessibility Services, but I wonder how it queries the current URL from Chrome.

PS. Apparently it only works for Chrome (it doesn't pop up in Opera for example) so it might be something Chrome specific.

like image 473
marlar Avatar asked Dec 28 '16 15:12

marlar


People also ask

How do I allow access to file URLs in LastPass?

If you open a Chrome browser window and navigate to chrome://extensions, you may notice the option "Allow access to file URLs" underneath of the LastPass extension. This option is mostly for web developers. Checking this option allows LastPass to login and fill forms for local files such as file:///C:/dev/test.html.

How does the LastPass Chrome extension work?

Once you download the LastPass extension from the Chrome Web Store, it integrates directly with Chrome. Whenever you log in to an account, LastPass will ask to save the username and password.

Why should you use a password manager like LastPass?

Many people choose a password manager like LastPass for the added security and flexibility. Once you download the LastPass extension from the Chrome Web Store, it integrates directly with Chrome. Whenever you log in to an account, LastPass will ask to save the username and password.

What is “allow access to file URLs” in chrome?

What is "Allow access to file URLs" in Chrome? If you open a Chrome browser window and navigate to chrome://extensions, you may notice the option "Allow access to file URLs" underneath of the LastPass extension. This option is mostly for web developers.


1 Answers

LastPass on Android asks for Accessibility permission with canRetrieveWindowContent true. This lets it traverse the current view hierarchy, and access the views as AccessibilityNodeInfo objects.

Accessibility API lets you search nodes by the text displayed on the view, and also gives you java class name of each such view. AccessibilityNodeInfo#findAccessibilityNodeInfosByText

The feature doesn't work on Opera probably because the devs never handled the view hierarchy traversing logic for it.

Check out https://developer.android.com/guide/topics/ui/accessibility/services.html

like image 150
Vibin Avatar answered Nov 15 '22 04:11

Vibin