Skip to content

Conversation

@binarynoise
Copy link
Owner

Potential fix for https://github.com/binarynoise/CaptivePortalAutoLogin/security/code-scanning/1

To fix the problem, the onReceive method of BootCompletedReceiver should check that the received intent's action is Intent.ACTION_BOOT_COMPLETED before executing any logic. This ensures that only the legitimate system broadcast will trigger the receiver's functionality. The check should be added at the start of the onReceive method, returning early if the action does not match. No additional imports are needed, as Intent.ACTION_BOOT_COMPLETED is available in the Android SDK. The fix should be applied in app/src/main/kotlin/de/binarynoise/captiveportalautologin/BootCompletedReceiver.kt, specifically in the onReceive method.


Suggested fixes powered by Copilot Autofix. Review carefully before merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants