From cbb1f819c2f82af3e99e10dda29e216877a5187c Mon Sep 17 00:00:00 2001 From: Peter Qiu Date: Mon, 12 Dec 2016 13:56:48 -0800 Subject: configparse: do not delete passpoint configuration file 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) --- service/java/com/android/server/wifi/configparse/ConfigBuilder.java | 6 ------ 1 file changed, 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 e8e5e6a18..602b120cf 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 { -- cgit v1.2.3