• R/O
  • HTTP
  • SSH
  • HTTPS

コミット

よく使われているワード(クリックで追加)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

packages/apps/Settings


コミットメタ情報

リビジョンf1125282f9834e5e65f0224c624aa2a446ad939e (tree)
日時2021-03-11 18:48:07
作者András Klöczl <andraskloczl@goog...>
コミッターAndroid (Google) Code Review

ログメッセージ

Merge "Prevent using invalid result uri during multi user image change" into pi-dev

変更サマリ

差分

--- a/src/com/android/settings/users/EditUserPhotoController.java
+++ b/src/com/android/settings/users/EditUserPhotoController.java
@@ -38,6 +38,7 @@ import android.os.UserHandle;
3838 import android.os.UserManager;
3939 import android.provider.ContactsContract.DisplayPhoto;
4040 import android.provider.MediaStore;
41+import android.util.EventLog;
4142 import android.support.v4.content.FileProvider;
4243 import android.util.Log;
4344 import android.view.Gravity;
@@ -114,6 +115,14 @@ public class EditUserPhotoController {
114115 }
115116 final Uri pictureUri = data != null && data.getData() != null
116117 ? data.getData() : mTakePictureUri;
118+
119+ // Check if the result is a content uri
120+ if (!ContentResolver.SCHEME_CONTENT.equals(pictureUri.getScheme())) {
121+ Log.e(TAG, "Invalid pictureUri scheme: " + pictureUri.getScheme());
122+ EventLog.writeEvent(0x534e4554, "172939189", -1, pictureUri.getPath());
123+ return false;
124+ }
125+
117126 switch (requestCode) {
118127 case REQUEST_CODE_CROP_PHOTO:
119128 onPhotoCropped(pictureUri, true);