summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/com/android/bluetooth/opp/BluetoothOppObexServerSession.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/com/android/bluetooth/opp/BluetoothOppObexServerSession.java b/src/com/android/bluetooth/opp/BluetoothOppObexServerSession.java
index cb292c1b1..a58df0dda 100644
--- a/src/com/android/bluetooth/opp/BluetoothOppObexServerSession.java
+++ b/src/com/android/bluetooth/opp/BluetoothOppObexServerSession.java
@@ -230,10 +230,13 @@ public class BluetoothOppObexServerSession extends ServerRequestHandler implemen
}
// Reject policy: anything outside the "white list" plus unspecified
- // MIME Types.
+ // MIME Types. Also reject everything in the "black list".
if (!pre_reject
- && (mimeType == null || (!Constants.mimeTypeMatches(mimeType,
- Constants.ACCEPTABLE_SHARE_INBOUND_TYPES)))) {
+ && (mimeType == null
+ || !Constants.mimeTypeMatches(mimeType,
+ Constants.ACCEPTABLE_SHARE_INBOUND_TYPES)
+ || Constants.mimeTypeMatches(mimeType,
+ Constants.UNACCEPTABLE_SHARE_INBOUND_TYPES))) {
if (D) Log.w(TAG, "mimeType is null or in unacceptable list, reject the transfer");
pre_reject = true;
obexResponse = ResponseCodes.OBEX_HTTP_UNSUPPORTED_TYPE;