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

Commit ce43e009 authored by Jeff Sharkey's avatar Jeff Sharkey Committed by Android Git Automerger
Browse files

am f5e04717: Merge "Tighten enforcement of file modes." into jb-mr2-dev

* commit 'f5e04717':
  Tighten enforcement of file modes.
parents 30929b75 f5e04717
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -298,7 +298,7 @@ public abstract class ContentProvider implements ComponentCallbacks2 {

        private void enforceFilePermission(String callingPkg, Uri uri, String mode)
                throws FileNotFoundException, SecurityException {
            if (mode != null && mode.startsWith("rw")) {
            if (mode != null && mode.indexOf('w') != -1) {
                if (enforceWritePermission(callingPkg, uri) != AppOpsManager.MODE_ALLOWED) {
                    throw new FileNotFoundException("App op not allowed");
                }