Skip to content

Commit

Permalink
change: do not show password in diagnostic_console
Browse files Browse the repository at this point in the history
  • Loading branch information
w568w committed Apr 15, 2022
1 parent 3cbc517 commit 307a88a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/page/settings/diagnostic_console.dart
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ class _DiagnosticConsoleState extends State<DiagnosticConsole> {
bannerAd.load();
}

static const _IGNORE_KEYS = ["password"];

Future<void> diagnoseDanXi() async {
_console.writeln(
"User Agent used by DanXi: ${UserAgentInterceptor.defaultUsedUserAgent}");
Expand All @@ -134,6 +136,9 @@ class _DiagnosticConsoleState extends State<DiagnosticConsole> {
var allKeys = context.read<SettingsProvider>().preferences?.getKeys();
if (allKeys != null) {
for (var key in allKeys) {
// Skip some keys
if (_IGNORE_KEYS.contains(key)) continue;

_console.writeln("Key: $key");
_console.writeln(
"Value: ${context.read<SettingsProvider>().preferences?.get(key)}");
Expand Down

0 comments on commit 307a88a

Please sign in to comment.