Fix remote wipe keychain storage (issue #1592)
authorMichael Schuster <michael@schuster.ms>
Fri, 29 Nov 2019 03:28:50 +0000 (04:28 +0100)
committerCamila Ayres <smayres@gmail.com>
Fri, 29 Nov 2019 12:53:52 +0000 (13:53 +0100)
commitdcc84d35085d790a53b472d1edba663832af238a
tree5c822120379a5f0ff7daa75ea25fa9894df7d11d
parent8ae18d9935c52b225908d43b618fa5c964f300f4
Fix remote wipe keychain storage (issue #1592)

The app password for the remote wipe was constantly being written in
WebFlowCredentials::slotFinished to the keychain, leading to unnecessary
write and log overhead on the system.

This fix introduces a check to only store the app password once in
a lifetime of the Account class. Also the method used to store the
password will be renamed from setAppPassword to writeAppPasswordOnce
to be more expressive.

Signed-off-by: Michael Schuster <michael@schuster.ms>
src/gui/creds/webflowcredentials.cpp
src/libsync/account.cpp
src/libsync/account.h