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

Commit 08a42ed8 authored by Jeff Sharkey's avatar Jeff Sharkey Committed by Android (Google) Code Review
Browse files

Merge "Log when Uris are normalized to help triage."

parents c7be180e 4a7b6ac0
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -2104,7 +2104,11 @@ public abstract class ContentProvider implements ComponentCallbacks2 {
        // a source of security issues.
        final String encodedPath = uri.getEncodedPath();
        if (encodedPath != null && encodedPath.indexOf("//") != -1) {
            return uri.buildUpon().encodedPath(encodedPath.replaceAll("//+", "/")).build();
            final Uri normalized = uri.buildUpon()
                    .encodedPath(encodedPath.replaceAll("//+", "/")).build();
            Log.w(TAG, "Normalized " + uri + " to " + normalized
                    + " to avoid possible security issues");
            return normalized;
        } else {
            return uri;
        }