mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-08-19 12:49:54 +01:00
Strip user-ID prefix from content authority in isValidExternalUri.
This commit is contained in:
@@ -32,7 +32,10 @@ object UriUtil {
|
||||
}
|
||||
} else if (ContentResolver.SCHEME_CONTENT == uri.scheme) {
|
||||
val authority = uri.authority ?: return false
|
||||
return !authority.startsWith(context.packageName)
|
||||
|
||||
// Protect against URI's like "content://0@org.thoughtcrime.securesms.part/..."
|
||||
val normalizedAuthority = authority.substringAfterLast('@')
|
||||
return !normalizedAuthority.startsWith(context.packageName)
|
||||
} else {
|
||||
return true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user