[PR #159] fix: make implicit intents safe #179

Open
opened 2026-02-26 21:32:35 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/seemoo-lab/AirGuard/pull/159
Author: @Pablito2020
Created: 11/18/2023
Status: 🔄 Open

Base: mainHead: main


📝 Commits (2)

  • 83b49d0 fix: make implicit intents safe
  • 852cb77 perf: use inline function for implicit intent from fragment

📊 Changes

7 files changed (+40 additions, -8 deletions)

View changed files

📝 app/src/main/java/de/seemoo/at_tracking_detection/ui/dashboard/RiskDetailFragment.kt (+1 -1)
📝 app/src/main/java/de/seemoo/at_tracking_detection/ui/onboarding/IgnoreBatteryOptimizationFragment.kt (+2 -1)
📝 app/src/main/java/de/seemoo/at_tracking_detection/ui/settings/InformationFragment.kt (+4 -4)
📝 app/src/main/java/de/seemoo/at_tracking_detection/ui/settings/SettingsFragment.kt (+2 -1)
app/src/main/java/de/seemoo/at_tracking_detection/util/SafeImplicitIntent.kt (+28 -0)
📝 app/src/main/java/de/seemoo/at_tracking_detection/util/ble/BLEScanner.kt (+2 -1)
📝 app/src/main/res/values/strings.xml (+1 -0)

📄 Description

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.)


🔄 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/seemoo-lab/AirGuard/pull/159 **Author:** [@Pablito2020](https://github.com/Pablito2020) **Created:** 11/18/2023 **Status:** 🔄 Open **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (2) - [`83b49d0`](https://github.com/seemoo-lab/AirGuard/commit/83b49d0be0aa0a1adc3dfa1511261a73f3729531) fix: make implicit intents safe - [`852cb77`](https://github.com/seemoo-lab/AirGuard/commit/852cb777d0bfe3789ee421149d05b57d617ea1f1) perf: use inline function for implicit intent from fragment ### 📊 Changes **7 files changed** (+40 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `app/src/main/java/de/seemoo/at_tracking_detection/ui/dashboard/RiskDetailFragment.kt` (+1 -1) 📝 `app/src/main/java/de/seemoo/at_tracking_detection/ui/onboarding/IgnoreBatteryOptimizationFragment.kt` (+2 -1) 📝 `app/src/main/java/de/seemoo/at_tracking_detection/ui/settings/InformationFragment.kt` (+4 -4) 📝 `app/src/main/java/de/seemoo/at_tracking_detection/ui/settings/SettingsFragment.kt` (+2 -1) ➕ `app/src/main/java/de/seemoo/at_tracking_detection/util/SafeImplicitIntent.kt` (+28 -0) 📝 `app/src/main/java/de/seemoo/at_tracking_detection/util/ble/BLEScanner.kt` (+2 -1) 📝 `app/src/main/res/values/strings.xml` (+1 -0) </details> ### 📄 Description 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.) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/AirGuard#179
No description provided.