fix: большой фикс недочетов и фикс пары язв

This commit is contained in:
Jganenok
2026-06-09 01:00:04 +07:00
parent 73ad6dd1e6
commit 580e30897b
32 changed files with 590 additions and 244 deletions
+18 -1
View File
@@ -1,6 +1,14 @@
import 'package:flutter/foundation.dart';
const _redacted = '***';
const _sensitiveSubstrings = ['password', 'token', 'phone', 'secret'];
const _sensitiveSubstrings = [
'password',
'token',
'phone',
'secret',
'auth',
];
const _sensitiveExact = {
'code',
@@ -12,6 +20,10 @@ const _sensitiveExact = {
'qrlink',
'text',
'msisdn',
'deviceid',
'mt_instanceid',
'instanceid',
'webappdata',
};
bool _isSensitiveKey(Object? key) {
@@ -37,3 +49,8 @@ dynamic redactForLog(dynamic value) {
}
return value;
}
Object? payloadForLog(dynamic value) {
if (kReleaseMode) return '<payload hidden>';
return redactForLog(value);
}
+6
View File
@@ -0,0 +1,6 @@
import 'package:flutter/foundation.dart';
bool get webViewSupported {
if (kIsWeb) return true;
return defaultTargetPlatform != TargetPlatform.linux;
}