Commit Graph

28 Commits

Author SHA1 Message Date
Romain Le Jeune ee4da8a89c GODT-2291: Change gluon store default location from Cache to Data. 2023-01-24 13:35:45 +00:00
James Houlahan 03c8c323bc GODT-2251: Store gluon cache in user cache rather than user data 2023-01-16 16:27:41 +01:00
Romain Le Jeune 0580842ad2 GODT-2229: Own the full path for gluon and do not change Database path. 2023-01-12 13:23:09 +00:00
Jakub 715efaa087 Revert "GODT-2229: Allow changing cache folder to a non-empty folder."
This reverts commit b19e16e4b8.
2023-01-11 10:19:38 +01:00
Romain Le Jeune b19e16e4b8 GODT-2229: Allow changing cache folder to a non-empty folder. 2023-01-10 16:40:52 +00:00
Leander Beernaert 6d0a128111 Other: Update copyright year 2023-01-02 11:09:11 +01:00
James Houlahan e4b81063cb GODT-2213: Don't unnecessarily enable/disable autostart 2022-12-19 08:29:57 +00:00
Leander Beernaert 6ac8a4c0bc GODT-2160: Ensure we can safely move cache file
It's currently impossible to wait until all SQLite write finish to disk.
This is not guaranteed when closing the ent DB client.

The existing code to move the cache handles the case where the
new location is on a new drive. However, due to the above issue this can
now lead to database corruption.

To avoid database corruption we now use the `os.Rename` function and
prevent moving the cache between drives until a better solution can be
implemented.
2022-11-29 16:33:53 +01:00
James Houlahan 9f64e8a6fa Other: Wipe vault properly on factory reset
Deleting the file isn't enough because it's still held in memory
and is written back to disk on the next write (SetLastVersion during
bridge teardown).
2022-11-29 09:59:30 +01:00
James Houlahan e601245f01 Other(chore): Bump major version to v3 2022-11-23 16:08:27 +01:00
Jakub ae87d7b236 GODT-1913: pass reporter to gluon, limit restarts, add crash handlers. 2022-11-16 13:48:31 +01:00
James Houlahan 04f2dd1a0b GODT-2021: Remove gluon data when deleting user 2022-11-16 13:48:31 +01:00
James Houlahan 78fc5ec458 Other: Simple gRPC client/server under test 2022-11-16 13:48:30 +01:00
James Houlahan d4da325e57 Other(refactor): Sort safe.Mutex types before locking to prevent deadlocks
This change implements safe.Mutex and safe.RWMutex, which wrap the
sync.Mutex and sync.RWMutex types and are assigned a globally unique
integer ID. The safe.Lock and safe.RLock methods sort the mutexes
by this integer ID before locking to ensure that locks for a given
set of mutexes are always performed in the same order, avoiding
deadlocks.
2022-11-16 13:48:30 +01:00
James Houlahan 2bda47fcad Other(refactor): Less unwieldy user type in Bridge
Instead of the annoying safe.Map type, we just use a normal go map
and mutex pair, and use safe.Lock/safe.RLock as a helper function
2022-11-16 13:48:30 +01:00
James Houlahan 7b7a2068ea Other: Clear keychain entries on factory reset 2022-11-16 13:48:30 +01:00
James Houlahan 6fbf6d90dc Other: Fix IMAP/SMTP/Login leaks/race conditions
Depending on the timing of bridge closure, it was possible for the 
IMAP/SMTP servers to not have started serving yet. By grouping this in
a cancelable goroutine group (*xsync.Group), we mitigate this issue.

Further, depending on internet disconnection timing during user login,
it was possible for a user to be improperly logged in. This change 
fixes this and adds test coverage for it.

Lastly, depending on timing, certain background tasks (updates check,
connectivity ping) could be improperly started or closed. This change
groups them in the *xsync.Group as well to be closed properly.
2022-11-16 13:48:30 +01:00
Leander Beernaert a7a7d9a3d4 GODT-1742: Implement hide All Mail 2022-11-16 12:26:09 +01:00
Leander Beernaert e10cd2a3ed GODT-1901: Allow to set IMAP SSL from UI 2022-11-16 12:26:09 +01:00
James Houlahan a74b025de3 Other: Factory reset 2022-11-16 12:26:09 +01:00
James Houlahan fd63611b41 Other: Safer user types 2022-11-16 12:26:09 +01:00
James Houlahan 14a578f319 Other: Linter fixes after bumping linter version 2022-11-16 12:26:09 +01:00
Leander Beernaert f01c70e506 GODT-1816: Connect Gluon Logs to bridge Logs
Ensure the IMAP commands and SMTP commands are logged to trace channels
with an entry so they are recognizable as before.
2022-11-16 12:26:09 +01:00
James Houlahan 509a767e50 GODT-1657: More stable sync, with some tests 2022-11-16 12:26:09 +01:00
James Houlahan e9672e6bba GODT-1815: Combined/Split mode 2022-11-16 12:26:08 +01:00
James Houlahan 9670e29d9f GODT-1815: Start with missing gluon files 2022-11-16 12:26:08 +01:00
James Houlahan 39433fe707 GODT-1779: Remove go-imap 2022-11-16 12:26:08 +01:00
James Houlahan 0c7453684b Other(refactor): Move Settings out of frontend 2022-09-01 13:27:06 +02:00