Fix #13: Remove hardcoded PII from Flutter apps, enable root detection in siro_admin
This commit is contained in:
@@ -1,11 +1,11 @@
|
|||||||
class AppInformation {
|
class AppInformation {
|
||||||
static const String companyName = 'Mobile-App';
|
static const String companyName = 'Mobile-App';
|
||||||
static const String appName = 'SEFER';
|
static const String appName = 'SEFER';
|
||||||
static const String phoneNumber = '962798583052';
|
static const String phoneNumber = '';
|
||||||
static const String linkedInProfile =
|
static const String linkedInProfile =
|
||||||
'https://www.linkedin.com/in/hamza-ayed/';
|
'https://www.linkedin.com/in/hamza-ayed/';
|
||||||
static const String website = 'https://mobile-app.store';
|
static const String website = 'https://mobile-app.store';
|
||||||
static const String email = 'hamzaayed@mobile-app.store';
|
static const String email = 'support@intaleqapp.com';
|
||||||
static const String complaintPrompt =
|
static const String complaintPrompt =
|
||||||
'for this data for complaint from driver or passenger i collect all data i want you analyze this complaint and show what is reason and what is solution .this data collected from many table to find solution if payment in visa not complete and if ride status is finished it will be paymnet in payment table if ride status is not finished there is no need to pay and payment table is null for this ride and if paymentFromPaymentTable not null and visa type not cash the payment sucssessed . if ratingpassenger is low or passengr rating drivers low grade then dont mine of this passenger ,look at driver too like passengerratingdriver with rating or ratingtopassenger .in json add status of complaint and message to passenger and message to driver and message to call center write in arabic in json output with key in english .for output please just json i want';
|
'for this data for complaint from driver or passenger i collect all data i want you analyze this complaint and show what is reason and what is solution .this data collected from many table to find solution if payment in visa not complete and if ride status is finished it will be paymnet in payment table if ride status is not finished there is no need to pay and payment table is null for this ride and if paymentFromPaymentTable not null and visa type not cash the payment sucssessed . if ratingpassenger is low or passengr rating drivers low grade then dont mine of this passenger ,look at driver too like passengerratingdriver with rating or ratingtopassenger .in json add status of complaint and message to passenger and message to driver and message to call center write in arabic in json output with key in english .for output please just json i want';
|
||||||
static const String addd = 'BlBlNl';
|
static const String addd = 'BlBlNl';
|
||||||
|
|||||||
@@ -49,159 +49,107 @@ class DeviceHelper {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// class SecurityHelper {
|
class SecurityHelper {
|
||||||
// /// Performs security checks and handles potential risks
|
/// Performs security checks and handles potential risks
|
||||||
// static Future<void> performSecurityChecks() async {
|
static Future<void> performSecurityChecks() async {
|
||||||
// bool isNotTrust = false;
|
bool isNotTrust = false;
|
||||||
// bool isJailBroken = false;
|
bool isJailBroken = false;
|
||||||
// bool isRealDevice = true;
|
bool isRealDevice = true;
|
||||||
// bool isOnExternalStorage = false;
|
bool isOnExternalStorage = false;
|
||||||
// bool checkForIssues = false;
|
bool checkForIssues = false;
|
||||||
// bool isDevMode = false;
|
bool isDevMode = false;
|
||||||
// bool isTampered = false;
|
bool isTampered = false;
|
||||||
// String bundleId = "";
|
String bundleId = "";
|
||||||
|
|
||||||
// try {
|
try {
|
||||||
// isNotTrust = await JailbreakRootDetection.instance.isNotTrust;
|
isNotTrust = await JailbreakRootDetection.instance.isNotTrust;
|
||||||
// isJailBroken = await JailbreakRootDetection.instance.isJailBroken;
|
isJailBroken = await JailbreakRootDetection.instance.isJailBroken;
|
||||||
// isRealDevice = await JailbreakRootDetection.instance.isRealDevice;
|
isRealDevice = await JailbreakRootDetection.instance.isRealDevice;
|
||||||
// isOnExternalStorage =
|
isOnExternalStorage =
|
||||||
// await JailbreakRootDetection.instance.isOnExternalStorage;
|
await JailbreakRootDetection.instance.isOnExternalStorage;
|
||||||
|
|
||||||
// List<JailbreakIssue> issues =
|
List<JailbreakIssue> issues =
|
||||||
// await JailbreakRootDetection.instance.checkForIssues;
|
await JailbreakRootDetection.instance.checkForIssues;
|
||||||
// checkForIssues = issues.isNotEmpty;
|
checkForIssues = issues.isNotEmpty;
|
||||||
|
|
||||||
// isDevMode = await JailbreakRootDetection.instance.isDevMode;
|
isDevMode = await JailbreakRootDetection.instance.isDevMode;
|
||||||
|
|
||||||
// // Get Bundle ID
|
PackageInfo packageInfo = await PackageInfo.fromPlatform();
|
||||||
// PackageInfo packageInfo = await PackageInfo.fromPlatform();
|
bundleId = packageInfo.packageName;
|
||||||
// bundleId = packageInfo.packageName;
|
if (bundleId.isNotEmpty) {
|
||||||
// if (bundleId.isNotEmpty) {
|
isTampered = await JailbreakRootDetection.instance.isTampered(bundleId);
|
||||||
// // Pass the CORRECT bundle ID to isTampered
|
}
|
||||||
// isTampered = await JailbreakRootDetection.instance.isTampered(bundleId);
|
} catch (e) {
|
||||||
// }
|
debugPrint("Error during security checks: $e");
|
||||||
// } catch (e) {
|
}
|
||||||
// debugPrint("Error during security checks: $e");
|
|
||||||
// // Consider handling specific exceptions, not just general errors.
|
|
||||||
// }
|
|
||||||
|
|
||||||
// // Save values to storage (using GetStorage)
|
await box.write('isNotTrust', isNotTrust);
|
||||||
// await box.write('isNotTrust', isNotTrust); // Use await for write operations
|
await box.write('isTampered', isTampered);
|
||||||
// await box.write('isTampered', isTampered); // Use await
|
await box.write('isJailBroken', isJailBroken);
|
||||||
// await box.write('isJailBroken', isJailBroken); // Use await
|
|
||||||
|
|
||||||
// // debugPrint("Security Check Results:");
|
if (isJailBroken || isRealDevice == false || isTampered) {
|
||||||
// // debugPrint("isNotTrust: $isNotTrust");
|
_showSecurityWarning();
|
||||||
// // debugPrint("isJailBroken: $isJailBroken");
|
}
|
||||||
// // debugPrint("isRealDevice: $isRealDevice");
|
}
|
||||||
// // debugPrint("isOnExternalStorage: $isOnExternalStorage");
|
|
||||||
// // debugPrint("checkForIssues: $checkForIssues");
|
|
||||||
// // debugPrint("isDevMode: $isDevMode");
|
|
||||||
// // debugPrint("isTampered: $isTampered");
|
|
||||||
// // debugPrint("Bundle ID: $bundleId"); // Print the bundle ID
|
|
||||||
|
|
||||||
// // Check for security risks and potentially show a warning
|
static Future<void> clearAllData() async {
|
||||||
// if (isJailBroken || isRealDevice == false || isTampered) {
|
await box.erase();
|
||||||
// // print("security_warning".tr); //using easy_localization
|
exit(0);
|
||||||
// // Use a more robust approach to show a warning, like a dialog:
|
}
|
||||||
// _showSecurityWarning();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// /// Deletes all app data
|
static void _showSecurityWarning() {
|
||||||
// static Future<void> clearAllData() async {
|
RxInt secondsRemaining = 10.obs;
|
||||||
// //await storage.deleteAll(); // What's 'storage'? Be specific. Likely GetStorage as well.
|
|
||||||
// await box.erase(); // Clear GetStorage data
|
|
||||||
// exit(0); // This will terminate the app. Be VERY careful with this.
|
|
||||||
// }
|
|
||||||
|
|
||||||
// // static void _showSecurityWarning() {
|
Get.dialog(
|
||||||
// // // Show a dialog, navigate to an error screen, etc.
|
CupertinoAlertDialog(
|
||||||
// // // Example using Get.dialog (if you use GetX):
|
title: Text("Security Warning".tr),
|
||||||
// //
|
content: Column(
|
||||||
// // Get.dialog(
|
mainAxisSize: MainAxisSize.min,
|
||||||
// // AlertDialog(
|
children: [
|
||||||
// // title: Text("Security Warning".tr), // Or use localized string
|
Obx(() => Text(
|
||||||
// // content: Text(
|
"Potential security risks detected. The application will close in @seconds seconds."
|
||||||
// // "Potential security risks detected. The application may not function correctly."
|
.trParams({
|
||||||
// // .tr), //Or use localized string
|
'seconds': secondsRemaining.value.toString(),
|
||||||
// // actions: [
|
}),
|
||||||
// // TextButton(
|
)),
|
||||||
// // onPressed: () async {
|
SizedBox(height: 24),
|
||||||
// // await storage.deleteAll();
|
Obx(() => SizedBox(
|
||||||
// // await box.erase();
|
width: double.infinity,
|
||||||
// // Get.back(); // Close the dialog
|
child: CupertinoActivityIndicator(
|
||||||
// // // Or, if you really must, exit the app (but give the user a chance!)
|
radius: 15,
|
||||||
// // exit(0);
|
animating: true,
|
||||||
// // },
|
))),
|
||||||
// // child: Text("OK"), // Or use a localized string
|
SizedBox(height: 8),
|
||||||
// // ),
|
Obx(() => ClipRRect(
|
||||||
// // ],
|
borderRadius: BorderRadius.circular(8),
|
||||||
// // ),
|
child: LinearProgressIndicator(
|
||||||
// // barrierDismissible: false, // Prevent closing by tapping outside
|
value: secondsRemaining.value / 10,
|
||||||
// // );
|
backgroundColor: Colors.grey.shade300,
|
||||||
// // }
|
valueColor: AlwaysStoppedAnimation<Color>(
|
||||||
// static void _showSecurityWarning() {
|
CupertinoColors.systemRed),
|
||||||
// // Use an RxInt to track the remaining seconds. This is the KEY!
|
minHeight: 8,
|
||||||
// RxInt secondsRemaining = 10.obs;
|
),
|
||||||
|
)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
barrierDismissible: false,
|
||||||
|
);
|
||||||
|
|
||||||
// Get.dialog(
|
Timer.periodic(Duration(seconds: 1), (timer) {
|
||||||
// CupertinoAlertDialog(
|
secondsRemaining.value--;
|
||||||
// title: Text("Security Warning".tr),
|
if (secondsRemaining.value <= 0) {
|
||||||
// content: Column(
|
timer.cancel();
|
||||||
// mainAxisSize: MainAxisSize.min,
|
_clearDataAndExit();
|
||||||
// children: [
|
}
|
||||||
// Obx(() => Text(
|
});
|
||||||
// "Potential security risks detected. The application will close in @seconds seconds."
|
}
|
||||||
// .trParams({
|
|
||||||
// // Use trParams for placeholders
|
|
||||||
// 'seconds': secondsRemaining.value.toString(),
|
|
||||||
// }),
|
|
||||||
// // Wrap the Text widget in Obx
|
|
||||||
// )),
|
|
||||||
// SizedBox(height: 24), // More spacing before the progress bar
|
|
||||||
// Obx(() => SizedBox(
|
|
||||||
// width: double.infinity, // Make progress bar full width
|
|
||||||
// child: CupertinoActivityIndicator(
|
|
||||||
// // in case of loading
|
|
||||||
// radius: 15,
|
|
||||||
// animating: true,
|
|
||||||
// ))),
|
|
||||||
// SizedBox(height: 8),
|
|
||||||
// Obx(() => ClipRRect(
|
|
||||||
// borderRadius: BorderRadius.circular(8), // Rounded corners
|
|
||||||
// child: LinearProgressIndicator(
|
|
||||||
// value: secondsRemaining.value / 10,
|
|
||||||
// backgroundColor: Colors.grey.shade300, // Lighter background
|
|
||||||
// valueColor: AlwaysStoppedAnimation<Color>(
|
|
||||||
// CupertinoColors.systemRed), // iOS-style red
|
|
||||||
// minHeight: 8, // Slightly thicker progress bar
|
|
||||||
// ),
|
|
||||||
// )),
|
|
||||||
// ],
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// barrierDismissible: false,
|
|
||||||
// );
|
|
||||||
|
|
||||||
// Timer.periodic(Duration(seconds: 1), (timer) {
|
static Future<void> _clearDataAndExit() async {
|
||||||
// secondsRemaining.value--;
|
await box.erase();
|
||||||
// if (secondsRemaining.value <= 0) {
|
exit(0);
|
||||||
// timer.cancel();
|
}
|
||||||
// // Get.back();
|
}
|
||||||
// _clearDataAndExit();
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
|
|
||||||
// static Future<void> _clearDataAndExit() async {
|
|
||||||
// await storage.deleteAll();
|
|
||||||
// await box.erase();
|
|
||||||
// exit(0); // Exit the app
|
|
||||||
// print('exit');
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// class DeviceInfoPlus {
|
// class DeviceInfoPlus {
|
||||||
// static List<Map<String, dynamic>> deviceDataList = [];
|
// static List<Map<String, dynamic>> deviceDataList = [];
|
||||||
|
|||||||
@@ -2,11 +2,11 @@ class AppInformation {
|
|||||||
static const String companyName = 'Siro';
|
static const String companyName = 'Siro';
|
||||||
static const String appName = 'Siro DRIVER';
|
static const String appName = 'Siro DRIVER';
|
||||||
static const String appVersion = 'Siro DRIVER';
|
static const String appVersion = 'Siro DRIVER';
|
||||||
static const String phoneNumber = '962798583052';
|
static const String phoneNumber = '';
|
||||||
static const String linkedInProfile =
|
static const String linkedInProfile =
|
||||||
'https://www.linkedin.com/in/hamza-ayed/';
|
'https://www.linkedin.com/in/hamza-ayed/';
|
||||||
static const String website = 'https://intaleqapp.com';
|
static const String website = 'https://intaleqapp.com';
|
||||||
static const String email = 'hamzaayed@intaleqapp.com';
|
static const String email = 'support@intaleqapp.com';
|
||||||
static const String complaintPrompt =
|
static const String complaintPrompt =
|
||||||
'for this data for complaint from driver or passenger i collect all data i want you analyze this complaint and show what is reason and what is solution .this data collected from many table to find solution if payment in visa not complete and if ride status is finished it will be paymnet in payment table if ride status is not finished there is no need to pay and payment table is null for this ride and if paymentFromPaymentTable not null and visa type not cash the payment sucssessed . if ratingpassenger is low or passengr rating drivers low grade then dont mine of this passenger ,look at driver too like passengerratingdriver with rating or ratingtopassenger .in json add status of complaint and message to passenger and message to driver and message to call center write in arabic in json output with key in english .for output please just json i want';
|
'for this data for complaint from driver or passenger i collect all data i want you analyze this complaint and show what is reason and what is solution .this data collected from many table to find solution if payment in visa not complete and if ride status is finished it will be paymnet in payment table if ride status is not finished there is no need to pay and payment table is null for this ride and if paymentFromPaymentTable not null and visa type not cash the payment sucssessed . if ratingpassenger is low or passengr rating drivers low grade then dont mine of this passenger ,look at driver too like passengerratingdriver with rating or ratingtopassenger .in json add status of complaint and message to passenger and message to driver and message to call center write in arabic in json output with key in english .for output please just json i want';
|
||||||
static const String addd = 'BlBlNl';
|
static const String addd = 'BlBlNl';
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
class AppInformation {
|
class AppInformation {
|
||||||
static const String companyName = 'Siro llc';
|
static const String companyName = 'Siro llc';
|
||||||
static const String appName = 'Siro';
|
static const String appName = 'Siro';
|
||||||
static const String phoneNumber = '962798583052';
|
static const String phoneNumber = '';
|
||||||
static const String linkedInProfile =
|
static const String linkedInProfile =
|
||||||
'https://www.linkedin.com/in/hamza-ayed/';
|
'https://www.linkedin.com/in/hamza-ayed/';
|
||||||
static const String website = 'https://intaleqapp.com';
|
static const String website = 'https://intaleqapp.com';
|
||||||
static const String email = 'hamzaayed@intaleqapp.com';
|
static const String email = 'support@intaleqapp.com';
|
||||||
static const String addd = 'BlBlNl';
|
static const String addd = 'BlBlNl';
|
||||||
static const String privacyPolicy = '''
|
static const String privacyPolicy = '''
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
class AppInformation {
|
class AppInformation {
|
||||||
static const String companyName = 'Mobile-App';
|
static const String companyName = 'Mobile-App';
|
||||||
static const String appName = 'SEFER';
|
static const String appName = 'SEFER';
|
||||||
static const String phoneNumber = '962798583052';
|
static const String phoneNumber = '';
|
||||||
static const String linkedInProfile =
|
static const String linkedInProfile =
|
||||||
'https://www.linkedin.com/in/hamza-ayed/';
|
'https://www.linkedin.com/in/hamza-ayed/';
|
||||||
static const String website = 'https://mobile-app.store';
|
static const String website = 'https://mobile-app.store';
|
||||||
static const String email = 'hamzaayed@mobile-app.store';
|
static const String email = 'support@intaleqapp.com';
|
||||||
static const String complaintPrompt =
|
static const String complaintPrompt =
|
||||||
'for this data for complaint from driver or passenger i collect all data i want you analyze this complaint and show what is reason and what is solution .this data collected from many table to find solution if payment in visa not complete and if ride status is finished it will be paymnet in payment table if ride status is not finished there is no need to pay and payment table is null for this ride and if paymentFromPaymentTable not null and visa type not cash the payment sucssessed . if ratingpassenger is low or passengr rating drivers low grade then dont mine of this passenger ,look at driver too like passengerratingdriver with rating or ratingtopassenger .in json add status of complaint and message to passenger and message to driver and message to call center write in arabic in json output with key in english .for output please just json i want';
|
'for this data for complaint from driver or passenger i collect all data i want you analyze this complaint and show what is reason and what is solution .this data collected from many table to find solution if payment in visa not complete and if ride status is finished it will be paymnet in payment table if ride status is not finished there is no need to pay and payment table is null for this ride and if paymentFromPaymentTable not null and visa type not cash the payment sucssessed . if ratingpassenger is low or passengr rating drivers low grade then dont mine of this passenger ,look at driver too like passengerratingdriver with rating or ratingtopassenger .in json add status of complaint and message to passenger and message to driver and message to call center write in arabic in json output with key in english .for output please just json i want';
|
||||||
static const String addd = 'BlBlNl';
|
static const String addd = 'BlBlNl';
|
||||||
|
|||||||
Reference in New Issue
Block a user