-
Android - Information leakage flaw OutputStream
about 8 years ago
-
about 8 years ago
Hi,
Please compare your code from line 535 of CameraLauncher.java file:Uri uri = Uri.fromFile(createCaptureFile(this.encodingType, System.currentTimeMillis() + "")); bitmap = getScaledBitmap(sourcePath); // Double-check the bitmap. if (bitmap == null) { Log.d(LOG_TAG, "I either have a null image path or bitmap"); this.failPicture("Unable to create bitmap!"); return; } if (rotate != 0 && this.correctOrientation) { bitmap = getRotatedBitmap(rotate, bitmap, exif); } // Add compressed version of captured image to returned media store Uri OutputStream os = this.cordova.getActivity().getContentResolver().openOutputStream(uri); CompressFormat compressFormat = encodingType == JPEG ? CompressFormat.JPEG : CompressFormat.PNG; bitmap.compress(compressFormat, this.mQuality, os); os.close(); // Restore exif data to file if (this.encodingType == JPEG) { String exifPath; exifPath = uri.getPath(); exif.createOutFile(exifPath); exif.writeExifData(); } // Send Uri back to JavaScript for viewing image this.callbackContext.success(uri.toString());
Also, I am using cordova 6.1.0 version and camera plugin working fine.
-
1 Answer(s)