Check decrypted json

pull/187/head
M66B 4 years ago
parent 27f327e8ea
commit d99e0c893f

@ -738,8 +738,12 @@ public class ActivitySetup extends ActivityBase implements FragmentManager.OnBac
data.append(line);
}
String json = data.toString();
if (!json.startsWith("{") || !json.endsWith("}"))
throw new BadPaddingException("JSON");
Log.i("Importing data");
JSONObject jimport = new JSONObject(data.toString());
JSONObject jimport = new JSONObject(json);
DB db = DB.getInstance(context);
NotificationManager nm = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);

Loading…
Cancel
Save