-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Desktop: Fixes #9985: Filter Sync Target Info Logs #10014
Changes from 3 commits
054b988
b319fdd
0e79f4f
441b85e
612b705
320a8cc
32d6dfa
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -240,6 +240,26 @@ export class SyncInfo { | |
}; | ||
} | ||
|
||
public filterSyncInfo() { | ||
const filtered = JSON.parse(JSON.stringify(this)); | ||
|
||
// Filter content and checksum properties from master keys | ||
if (filtered.masterKeys_) { | ||
filtered.masterKeys_ = filtered.masterKeys_.map((mk: MasterKeyEntity) => { | ||
if (mk.content) delete mk.content; | ||
if (mk.checksum) delete mk.checksum; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why this check? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I remember some tests failing due to this, though they run fine now without it also. Not sure what caused the issue then. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok because I think with real data mk.checksum is an empty string so you wouldn't delete it in this case. And this check is unnecessary anyway |
||
return mk; | ||
}); | ||
} | ||
|
||
// Truncate the private key and public key | ||
if (filtered.ppk_.value) { | ||
filtered.ppk_.value.privateKey.ciphertext = `${filtered.ppk_.value.privateKey.ciphertext.substr(0, 20)}...${filtered.ppk_.value.privateKey.ciphertext.substr(-20)}`; | ||
filtered.ppk_.value.publicKey = filtered.ppk_.value.publicKey.substr(0, 40); | ||
} | ||
return filtered; | ||
} | ||
|
||
public serialize(): string { | ||
return JSON.stringify(this.toObject(), null, '\t'); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you try the app and use more realistic data? Checking that the time or size is 0 is not a good test - it might be 0 because of a bug.