Config: make parsing stricter
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
committed by
Samuel Holland
parent
14a7ada6e1
commit
e421b997cd
@@ -369,6 +369,11 @@ public class VpnService extends Service
|
||||
config.setName(configName);
|
||||
configs.add(config);
|
||||
} catch (IllegalArgumentException | IOException e) {
|
||||
try {
|
||||
file.delete();
|
||||
} catch (Exception e2) {
|
||||
Log.w(TAG, "Could not remove " + fileName, e2);
|
||||
}
|
||||
Log.w(TAG, "Failed to load config from " + fileName, e);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user