Update: 2026-06-26 01:10:36
This commit is contained in:
@@ -244,7 +244,13 @@ class CRUD {
|
||||
}
|
||||
|
||||
// Initialize app signature if null
|
||||
_appSignature ??= await SecurityHelper.getAppSignature();
|
||||
if (_appSignature == null) {
|
||||
try {
|
||||
_appSignature = await SecurityHelper.getAppSignature();
|
||||
} catch (_) {
|
||||
_appSignature = '';
|
||||
}
|
||||
}
|
||||
|
||||
final headers = {
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
@@ -277,7 +283,13 @@ class CRUD {
|
||||
};
|
||||
|
||||
// Initialize app signature if null
|
||||
_appSignature ??= await SecurityHelper.getAppSignature();
|
||||
if (_appSignature == null) {
|
||||
try {
|
||||
_appSignature = await SecurityHelper.getAppSignature();
|
||||
} catch (_) {
|
||||
_appSignature = '';
|
||||
}
|
||||
}
|
||||
|
||||
final headers = {
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
|
||||
@@ -14,6 +14,9 @@ class SecurityHelper {
|
||||
Log.print('----------------------------------------------------');
|
||||
return signature;
|
||||
|
||||
} on MissingPluginException {
|
||||
Log.print('⚠️ getAppSignature not implemented on this platform');
|
||||
return null;
|
||||
} on PlatformException catch (e) {
|
||||
Log.print('❌ Failed to get app signature: ${e.message}');
|
||||
return null;
|
||||
@@ -24,6 +27,8 @@ class SecurityHelper {
|
||||
try {
|
||||
final bool isRooted = await platform.invokeMethod('isNativeRooted');
|
||||
return isRooted;
|
||||
} on MissingPluginException {
|
||||
return false;
|
||||
} on PlatformException catch (e) {
|
||||
Log.print('❌ Failed to check root: ${e.message}');
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user