Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit d9f2f6f4 authored by Kevin F. Haggerty's avatar Kevin F. Haggerty
Browse files

Merge tag 'android-security-9.0.0_r68' into staging/lineage-16.0_merge_android-security-9.0.0_r68

Android Security 9.0.0 Release 68 (7249336)

* tag 'android-security-9.0.0_r68':
  Prevent using invalid result uri during multi user image change

Change-Id: I5d66092c73b0750ebcb8415e9d8973a5e57d8a3e
parents a0311f07 188ade07
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@ import android.os.UserHandle;
import android.os.UserManager;
import android.provider.ContactsContract.DisplayPhoto;
import android.provider.MediaStore;
import android.util.EventLog;
import android.support.v4.content.FileProvider;
import android.util.Log;
import android.view.Gravity;
@@ -114,6 +115,14 @@ public class EditUserPhotoController {
        }
        final Uri pictureUri = data != null && data.getData() != null
                ? data.getData() : mTakePictureUri;

        // Check if the result is a content uri
        if (!ContentResolver.SCHEME_CONTENT.equals(pictureUri.getScheme())) {
            Log.e(TAG, "Invalid pictureUri scheme: " + pictureUri.getScheme());
            EventLog.writeEvent(0x534e4554, "172939189", -1, pictureUri.getPath());
            return false;
        }

        switch (requestCode) {
            case REQUEST_CODE_CROP_PHOTO:
                onPhotoCropped(pictureUri, true);