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

Commit 4a7b6ac0 authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

Log when Uris are normalized to help triage.

Bug: 112555574
Test: manual
Change-Id: Iebf7785e93995f1a2a6d688a2b2aa0ec16c790c6
parent cca4ee08
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;
        }