Commit Graph
9 Commits
Author SHA1 Message Date
Jake Klinker 391770a376 Fix isFileUri to recognize URIs with spaces. am: 6e0ca56095
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Messaging/+/16603852

Change-Id: Ic248ca97e7c775e7cef298bf03cdf13c53fb9351
2022-01-12 01:22:35 +00:00
Jake Klinker 6e0ca56095 Fix isFileUri to recognize URIs with spaces.
The underlying framework recognizes " file://..." as a valid URI and fetches the file, allowing for a possible exploit (see b/209965112). This trims the URI so that we can properly recognize it as a file from within our code.

Bug: 209965112
Change-Id: I8d9d9100e9a8c3bd64d19015d2177a14ec2306f3
Test: See repro steps on http://b/209965112, was no longer able to repro.
2022-01-11 00:41:38 +00:00
Jake Klinker c81f5c1bab Convert URI scheme to lower case before checking if it is a file. am: 58ee29c68e am: 92ce418906
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Messaging/+/15998887

Change-Id: I060a8878e5b0ee6d62cc57c849c2ab0a898657fe
2021-10-07 05:43:44 +00:00
Jake Klinker 58ad3740df Convert URI scheme to lower case before checking if it is a file. am: 58ee29c68e am: 8a9e12764a
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Messaging/+/15998887

Change-Id: I8130588d8612124f3b827a93e44f242042edebf2
2021-10-07 05:42:16 +00:00
Jake Klinker 92ce418906 Convert URI scheme to lower case before checking if it is a file. am: 58ee29c68e
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Messaging/+/15998887

Change-Id: I807f76373239f2aceedde821b654ce9de26ecd86
2021-10-07 05:33:56 +00:00
Jake Klinker 8a9e12764a Convert URI scheme to lower case before checking if it is a file. am: 58ee29c68e
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Messaging/+/15998887

Change-Id: I54b996561d0248a4636e0991545cbfc0700e1ee4
2021-10-07 05:33:56 +00:00
Jake Klinker f40ef350b4 Convert URI scheme to lower case before checking if it is a file. am: 56bacbcb13
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Messaging/+/15998907

Change-Id: I708af5f19396bfcbbd6ee0ccea4f38c19c3c4dae
2021-10-07 04:53:55 +00:00
Jake Klinker 56bacbcb13 Convert URI scheme to lower case before checking if it is a file.
This fixes an edge case where a "File://" style URI could be passed in
but not pass this check, even though the underlying framework recognizes
this as a legitimate file.

Bug: 197328178
Test: See repro steps on http://b/197328178, was no longer able to
repro.

Change-Id: Id837744a79d1aca91b41d24207dc9b98f2b5b5e9
(cherry picked from commit 9607c95e71)
2021-10-06 22:38:45 +00:00
Jake Klinker 58ee29c68e Convert URI scheme to lower case before checking if it is a file.
This fixes an edge case where a "File://" style URI could be passed in
but not pass this check, even though the underlying framework recognizes
this as a legitimate file.

Bug: 197328178
Test: See repro steps on http://b/197328178, was no longer able to
repro.

Change-Id: Id837744a79d1aca91b41d24207dc9b98f2b5b5e9
(cherry picked from commit 9607c95e71)
2021-10-06 22:38:04 +00:00