Skip to content
Snippets Groups Projects
Commit 29a297b4 authored by Brian Delwiche's avatar Brian Delwiche
Browse files

Fix URI check in BluetoothOppUtility.java

Bug: 225880741
Test: BT unit tests, validated against researcher POC
Tag: #security
Ignore-AOSP-First: Security
Change-Id: I1330080abfd638fb36aad9535b6f5f5872986a7f
parent ccf02490
No related branches found
No related tags found
No related merge requests found
......@@ -48,6 +48,7 @@ import android.net.Uri;
import android.os.Environment;
import android.os.ParcelFileDescriptor;
import android.os.SystemProperties;
import android.util.EventLog;
import android.util.Log;
import com.android.bluetooth.R;
......@@ -78,7 +79,11 @@ public class BluetoothOppUtility {
new ConcurrentHashMap<Uri, BluetoothOppSendFileInfo>();
public static boolean isBluetoothShareUri(Uri uri) {
return uri.toString().startsWith(BluetoothShare.CONTENT_URI.toString());
if (uri.toString().startsWith(BluetoothShare.CONTENT_URI.toString())
&& !uri.getAuthority().equals(BluetoothShare.CONTENT_URI.getAuthority())) {
EventLog.writeEvent(0x534e4554, "225880741", -1, "");
}
return uri.getAuthority().equals(BluetoothShare.CONTENT_URI.getAuthority());
}
public static BluetoothOppTransferInfo queryRecord(Context context, Uri uri) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment