summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Qiu <zqiu@google.com>2016-12-12 21:56:48 (GMT)
committerSean McCreary <mccreary@mcwest.org>2017-03-22 18:45:30 (GMT)
commitcbb1f819c2f82af3e99e10dda29e216877a5187c (patch)
treea463e4aef2e40c959a01783af38e92119aaa78e5
parent7fe6a18b732bd0b29e195bb4f5bfe80020ebb7cd (diff)
downloadandroid_frameworks_opt_net_wifi-cbb1f819c2f82af3e99e10dda29e216877a5187c.zip
android_frameworks_opt_net_wifi-cbb1f819c2f82af3e99e10dda29e216877a5187c.tar.gz
android_frameworks_opt_net_wifi-cbb1f819c2f82af3e99e10dda29e216877a5187c.tar.bz2
configparse: do not delete passpoint configuration filereplicant-6.0-0001
Fix merge conflict into nyc-mr1-security release branches It is the caller's responsibility for deleting configuration files. This avoids the ConfigBuilder from deleting arbitrary files (specified by URI) pass-in by the callers. Bug: 33178389 Test: Verify Passpoint Configuration installation works using Shamu CVE-2017-0490 Change-Id: I54803dc711ede98a1ec1259077522032c543dca1 (cherry picked from commit 41c42f5bb544acf8bede2d05c6325657d92bd83c)
-rw-r--r--service/java/com/android/server/wifi/configparse/ConfigBuilder.java6
1 files changed, 0 insertions, 6 deletions
diff --git a/service/java/com/android/server/wifi/configparse/ConfigBuilder.java b/service/java/com/android/server/wifi/configparse/ConfigBuilder.java
index e8e5e6a..602b120 100644
--- a/service/java/com/android/server/wifi/configparse/ConfigBuilder.java
+++ b/service/java/com/android/server/wifi/configparse/ConfigBuilder.java
@@ -55,8 +55,6 @@ public class ConfigBuilder {
byte[] b64 = Base64.decode(new String(data, StandardCharsets.ISO_8859_1), Base64.DEFAULT);
Log.d(TAG, "Decoded: " + b64.length + " bytes.");
- dropFile(Uri.parse(uriString), context);
-
MIMEContainer mimeContainer = new
MIMEContainer(new LineNumberReader(
new InputStreamReader(new ByteArrayInputStream(b64), StandardCharsets.ISO_8859_1)),
@@ -80,10 +78,6 @@ public class ConfigBuilder {
return parse(inner, context);
}
- private static void dropFile(Uri uri, Context context) {
- context.getContentResolver().delete(uri, null, null);
- }
-
private static WifiConfiguration parse(MIMEContainer root, Context context)
throws IOException, GeneralSecurityException, SAXException {