Commit Graph
19 Commits
Author SHA1 Message Date
Jake Klinker 7c427d52ee [automerge] Use UriUtil when checking if a URI is a file. 2p: 27e27d944b am: a3f2d65241
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Messaging/+/16764000

Change-Id: I832aa4951ae4058d3d5f41c9a696c42eefa86401
2022-02-03 01:48:00 +00:00
Jake Klinker a3f2d65241 [automerge] Use UriUtil when checking if a URI is a file. 2p: 27e27d944b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Messaging/+/16764000

Bug: 215212561
Change-Id: I59e1aa0f1799fb1eb993bd4e1089b665d0965099
2022-01-31 20:30:29 +00:00
Jake Klinker 27e27d944b Use UriUtil when checking if a URI is a file.
UriUtil.isFileUri contains several additional fixes, so this ensure that existing instances where we check for the file scheme use this method as well. This covers all existing instances in the app of SCHEME_FILE.

Change-Id: I1f3131b33823eae3e620aa9608be8e72b2e84aa2
Bug: 215212561
2022-01-31 20:30:24 +00:00
Jake Klinker ebc64c5bae Use UriUtil when checking if a URI is a file.
UriUtil.isFileUri contains several additional fixes, so this ensure that existing instances where we check for the file scheme use this method as well. This covers all existing instances in the app of SCHEME_FILE.

Change-Id: I1f3131b33823eae3e620aa9608be8e72b2e84aa2
Bug: 215212561
2022-01-31 20:29:42 +00:00
Jake Klinker a0332cba4f Fix isFileUri to recognize URIs with spaces. am: 6e0ca56095 am: 391770a376
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Messaging/+/16603852

Change-Id: I14c97c261e4512e1631b90911a9c5abd1d1dd9bf
2022-01-12 01:40:57 +00:00
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 0b258f030a 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:38:25 +00:00
Jake Klinker 9c2b23d699 Convert URI scheme to lower case before checking if it is a file. am: 58ee29c68e am: 92ce418906 am: c81f5c1bab
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Messaging/+/15998887

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

Change-Id: I8b091551d96e91dcdb57110c92d4e465537d3b22
2021-10-07 05:58:15 +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 f93fcd5945 Convert URI scheme to lower case before checking if it is a file. am: 56bacbcb13 am: f40ef350b4
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Messaging/+/15998907

Change-Id: I49320ad77b19a9792d787590403d7eacf2d91b37
2021-10-07 05:04:12 +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
Jake Klinker 9607c95e71 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
2021-10-06 21:17:05 +00:00