seemoo-lab / AirGuard

Protect yourself from being tracked 🌍 by AirTags 🏷 and Find My accessories 📍
Apache License 2.0
1.96k stars 110 forks source link

fix: make implicit intents safe #159

Open Pablito2020 opened 1 year ago

Pablito2020 commented 1 year ago

The current code lacks verification of whether the implicit intent is fulfilled. In my device, I don't have any browser installed and, consequently, when I attempt to trigger an implicit intent by clicking a button to open a URL, the app crashes.

These modifications introduce comprehensive support to enhance the safety of implicit intents. This update addresses the issue by implementing a check to initiate the implicit intent securely. In cases where the implicit intent fails to start, a toast notification is displayed to the user, indicating the absence of an application capable of opening the content. (Note: This error handling can be customized using the onError lambda within the method, although the current approach aligns with the standard practice adopted by most applications.)