fix: большой фикс недочетов и фикс пары язв
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
import 'package:flutter/foundation.dart';
|
||||
|
||||
bool get webViewSupported {
|
||||
if (kIsWeb) return true;
|
||||
return defaultTargetPlatform != TargetPlatform.linux;
|
||||
}
|
||||
Reference in New Issue
Block a user