mirror of
https://github.com/greenart7c3/Amber.git
synced 2026-10-06 03:18:23 +00:00
Only accept bunker requests inside the content provider
This commit is contained in:
@@ -378,6 +378,7 @@ class SignerProvider : ContentProvider() {
|
||||
}
|
||||
|
||||
"content://$appId.GET_PUBLIC_KEY" -> {
|
||||
if (selection != "Amber") return null // only accept content provider when it's a bunker request
|
||||
val npub = if (projection != null && projection.isNotEmpty()) IntentUtils.parsePubKey(projection[0]) else null
|
||||
val account = if (npub != null) {
|
||||
LocalPreferences.loadFromEncryptedStorageSync(context!!, npub)
|
||||
|
||||
@@ -302,7 +302,7 @@ class EventNotificationConsumer(private val applicationContext: Context) {
|
||||
applicationContext.contentResolver.query(
|
||||
"content://${BuildConfig.APPLICATION_ID}.$type".toUri(),
|
||||
projection,
|
||||
null,
|
||||
"Amber",
|
||||
null,
|
||||
event.pubKey,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user