mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-11 05:06:51 +00:00
Other: Report corrupt and/or insecure vaults to sentry
This commit is contained in:
@ -206,6 +206,16 @@ func run(c *cli.Context) error { //nolint:funlen
|
|||||||
return withSingleInstance(locations, version, func() error {
|
return withSingleInstance(locations, version, func() error {
|
||||||
// Unlock the encrypted vault.
|
// Unlock the encrypted vault.
|
||||||
return WithVault(locations, func(vault *vault.Vault, insecure, corrupt bool) error {
|
return WithVault(locations, func(vault *vault.Vault, insecure, corrupt bool) error {
|
||||||
|
// Report insecure vault.
|
||||||
|
if insecure {
|
||||||
|
_ = reporter.ReportMessageWithContext("Vault is insecure", map[string]interface{}{})
|
||||||
|
}
|
||||||
|
|
||||||
|
// Report corrupt vault.
|
||||||
|
if corrupt {
|
||||||
|
_ = reporter.ReportMessageWithContext("Vault is corrupt", map[string]interface{}{})
|
||||||
|
}
|
||||||
|
|
||||||
if !vault.Migrated() {
|
if !vault.Migrated() {
|
||||||
// Migrate old settings into the vault.
|
// Migrate old settings into the vault.
|
||||||
if err := migrateOldSettings(vault); err != nil {
|
if err := migrateOldSettings(vault); err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user