Commit Graph

97 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
Xavier Michelon bb07138fb0
GODT-2236: add log entry when SMTP / IMAP serve method fails. 2023-01-04 16:45:34 +01:00
Leander Beernaert 6d0a128111 Other: Update copyright year 2023-01-02 11:09:11 +01:00
James Houlahan e601245f01 Other(chore): Bump major version to v3 2022-11-23 16:08:27 +01:00
James Houlahan ad1fb47b0d Other: Switch from liteapi to go-proton-api 2022-11-23 15:17:56 +01:00
James Houlahan 2972e1273f GODT-2045: Timeouts should be considered network issues 2022-11-20 10:07:33 +00:00
James Houlahan 0ce0e4765b GODT-2122: Handle check for updates failure 2022-11-20 10:04:16 +00:00
James Houlahan e5095b2154 Other: Add API debug option in QA builds 2022-11-17 13:20:31 +00:00
Jakub ae87d7b236 GODT-1913: pass reporter to gluon, limit restarts, add crash handlers. 2022-11-16 13:48:31 +01:00
James Houlahan 223b14e556 Other: Configure attachment pool size in vault 2022-11-16 13:48:31 +01:00
James Houlahan d74873be31 GODT-1978: Don't install the same update twice 2022-11-16 13:48:30 +01:00
James Houlahan d093488522 GODT-1978: Auto-updates 2022-11-16 13:48:30 +01:00
James Houlahan c548ba85fe Other: Add more extensive logging 2022-11-16 13:48:30 +01:00
James Houlahan b72de5e3a4 Other: Fix goroutine leak in OnStatusDown
We should spawn the goroutine as a bridge async task rather than as a
normal goroutine
2022-11-16 13:48:30 +01:00
James Houlahan 93d9ae32fc Other: Only listen on localhost and add send test
We should only listen on constants.Host when serving IMAP and SMTP.
This change fixes that. It also adds a test that we can send over SMTP
and receive over IMAP.
2022-11-16 13:48:30 +01:00
James Houlahan 7f6094750e Other: Use logrus for liteapi logs so we can properly capture them 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 8749d5dc7d Other(refactor): Remove always-nil return value of (*Bridge).Close 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 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
James Houlahan 828385b049 Other: Fix user sync leaks/race conditions
This fixes various race conditions and leaks related to the user's sync
and API event stream. It was possible for a sync/stream to begin after a
user was already closed; this change prevents that by managing the
goroutines related to sync/stream within cancellable groups.
2022-11-16 13:48:30 +01:00
Leander Beernaert 6bbaf03f1f Other: Fix goroutine leaks in sync tests
Add missing Close calls.

Properly handle nil channel for `user.startSync`.

This patch also updated liteapi and Gluon to latest master and dev
version respectively.
2022-11-16 13:48:30 +01:00
James Houlahan 0f125196a6 Other: Bump go-smtp version to fix race condition
There was a race condition internal to the go-smtp library.
In order to fix it, a version bump was necessary.
However, this significantly changed the library interface.
2022-11-16 13:48:30 +01:00
Leander Beernaert 7c62312220 Other: Fix all linter errors 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 593d86f3a7 Other: Single instance 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 6ee71d238b Other: Fix force-update test after version bump 2022-11-16 12:26:09 +01:00
James Houlahan 1c922ca083 Other: Fix flaky cookies test 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 9d69a2e565 GODT-1657: Stable sync (still needs more 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 612fb7ad7b GODT-1815: Start without internet, load users later 2022-11-16 12:26:08 +01:00
James Houlahan 39433fe707 GODT-1779: Remove go-imap 2022-11-16 12:26:08 +01:00
Jakub 3c6f80e520 GODT-1833: Linter and pipeline fix after rebase. 2022-09-01 13:44:01 +02:00
James Houlahan 4c52a12507 Other(refactor): Move UserAgent out of frontend 2022-09-01 13:26:09 +02:00
James Houlahan 2aaec3b6bd Other(refactor): Move TLS to Bridge 2022-09-01 13:24:41 +02:00
Jakub 8b39ea4acb GODT-1740: Opt-out All Mail visibility in settings file. 2022-08-16 23:43:19 +02:00
James Houlahan 4edf2eb92c Other: Add v2 to module name 2022-05-31 15:54:39 +02:00
Jakub f3c69faf8b GODT-1260: Renaming
* Renaming GUI, CLI, no-impact config.
* License header and documentation rebranding.
* Rename app title and vendor. Impact: manual install
* Migrating mac keychain and launch on startup.
* Fix linter and linter renaming
2022-05-18 11:23:38 +02:00
Jakub c7eb7234a2 GODT-1507: Enable autostart after Qt setup. 2022-03-07 17:01:18 +01:00
Jakub d356f306d9 Other: Change copyright year 2022-01-04 11:04:30 +01:00