54 Commits
Author SHA1 Message Date
Marcin Simonides 738ba26a27 fix: Update Cache4k to improve start time.
Old Cache4k uses old Stately library with some questionable choices that
causes slow initialization of IsoMutableMap and Cache objects. The new
version should be ok.
2025-04-03 10:14:32 +02:00
Neil Marietta 1e890eb103 test: Fixed build and dependencies (AccountRecoveryDialogTest is still failing). 2024-03-20 14:50:06 +01:00
Mateusz Armatys a046b3c1d7 test(human-verification): Improve test coverage for human-verification module. 2023-11-17 12:48:31 +00:00
Neil Marietta 49b0bd8eb5 refactor: Moved LogTag to domain layer. 2023-07-25 13:13:21 +02:00
yzhang 4d52ad2fb3 feat(pow): Add pow challenge solver duration for backend. 2023-07-20 02:41:56 +00:00
Neil Marietta ebfa017f37 chore!: Upgraded AGP to 8.0.2 (+Java 17). 2023-07-04 16:22:38 +02:00
Neil Marietta 935597e324 refactor: SessionManager now hold a Mutex for any session write (centralized).
Session is now separated into Authenticated and Unauthenticated.
2023-07-03 17:35:58 +02:00
Neil Marietta 3c475f8e00 fix(observability): Updated HV PageLoad status (added: 400, 404, 422). 2023-04-20 11:03:30 +00:00
yzhang c3fa5ce2d8 feat(human-verification): Add proof of work to the core library. 2023-04-14 03:21:07 -07:00
Neil Marietta 0651eac725 feat(observability): Observability metrics for Human Verification. 2023-02-20 10:51:11 +01:00
Mateusz Markowicz 31ed351482 feat(human-verification): Let clients extend HumanVerificationListenerImpl. 2023-01-06 13:06:49 +01:00
Neil Marietta ce45afa227 refactor(human-verification): Removed unneeded classes. 2022-12-13 15:56:48 +00:00
Mateusz Armatys b1c4e41746 test: Migrate tests to the new coroutines-test APIs. 2022-12-05 13:33:57 +00:00
Marino Meneghel 34a6c9219b fix: Pass test dispatcher to runTest method.
This is to solve test failures which started happening after updating
AGP to 7.1.3 (error `Detected use of different schedulers..`)
2022-09-28 17:50:17 +02:00
Neil Marietta e9e48c2631 refactor(human-verification-data): Renamed DB HumanVerificationEntity captchaVerificationToken to verificationToken.
New DB migration: HumanVerificationDatabase.MIGRATION_2.
2022-08-30 12:06:34 +00:00
Mateusz Armatys 08229f11d3 fix(human-verification): Delete invalid HumanVerificationEntity objects from DB.
In the past (HV2) it was possible to have `HumanVerificationNeeded` state,
and `null` captcha verification token. In HV3, for `HumanVerificationNeeded` state,
the captcha verification token should always be present.

The migration will delete all `HumanVerificationEntity`
objects except those that are in "success" state.

MIGRATION: `HumanVerificationDatabase.MIGRATION_1`
2022-08-04 09:40:04 +00:00
Mateusz Armatys 534a4667a9 fix(human-verification, network): The verificationToken returned by the server is never null.
The token could be null in HV2. Currently, the structure is shared between HV2 and HV3,
and it will always have the token initialized.
2022-08-04 09:40:04 +00:00
Mateusz Armatys 9730dc01a6 test: Use TestDispatcherProvider when creating ApiProvider. 2022-07-27 18:41:21 +02:00
Mateusz Armatys d444094979 refactor: Use @Binds whenever possible (instead of @Provide). 2022-07-25 19:55:43 +02:00
Mateusz Armatys 749b6b488c Revert "Create Dagger module for all Core modules"
This reverts commit 94ca12a41e.
2022-07-25 19:53:13 +02:00
Jorge Martin 94ca12a41e Create Dagger module for all Core modules 2022-07-25 16:47:31 +00:00
Mateusz Armatys 7ccf581781 fix(human-verification): User may be stuck on HV screen. 2022-06-24 15:31:38 +02:00
Mateusz Armatys 690aa5590d fix(human-verification)!: Fixes for HV3 when DoH is active.
- Allow self-signed certificates for HV webview POST requests.
- Workaround for CSP header.

BREAKING-CHANGE: Removed `context parameter from the constructor of `NetworkRequestOverriderImpl`.
2022-06-24 15:27:54 +02:00
Neil Marietta 5c4faa2c26 Clear consumed Payment Token (HumanVerification token). 2022-04-13 11:40:30 +02:00
Mateusz Armatys 78ba8126a0 New implementation of ProtonCookieStore, which implements okhttp3.CookieJar (and doesn't use java.net.HttpCookie) 2022-02-25 13:47:45 +01:00
Jorge Martin 76d3e1f073 Fix HV2 issues with DoH 2022-02-10 10:29:37 +00:00
dkadrikj 4bed2f612b Add localized message to the all API IO exceptions saying clearly to the user that the server is not available. 2022-02-03 11:36:11 +00:00
Jorge Martin ce23ddd12a Solve VPN HV3 integration issues, improve UX on sign up flow 2022-01-20 13:15:13 +00:00
Jorge Martin 31be14e978 Restore deleted ClientIdType Room converters 2022-01-03 10:44:18 +01:00
Jorge Martin 64b86226eb Get DoH working with HV3 2021-12-30 10:34:45 +00:00
dkadrikj 61fe6b77ea Clean up, optimise, refactor and fix tests. 2021-12-29 16:24:44 +01:00
Jorge Martin 8616371d86 Pass Human Verification methods as strings, don't filter them. 2021-12-23 10:14:47 +00:00
Jorge Martin be45bdb7c2 Add Human Verification v3 2021-12-10 10:16:07 +00:00
Neil Marietta ae9280d50b KeyStoreCrypto fallback if Android KeyStore is not properly working. 2021-09-21 16:25:03 +02:00
Neil Marietta 7e5d93881c HumanVerification: Added SMS/Email Token code validation. 2021-08-13 15:19:12 +02:00
Neil Marietta 95ee3cf404 HumanVerification: Fixed concurrency issue while updating state/token. 2021-08-13 15:19:12 +02:00
Neil Marietta ff22efde46 Added Data Room module. 2021-07-21 16:24:02 +02:00
Neil Marietta 63cb162e19 Refactored Core Database. 2021-07-21 16:24:02 +02:00
dkadrikj aff32aa851 Code improvement, bug fixes and bump versions. 2021-06-21 11:04:13 +02:00
Neil Marietta 1b7e6eb9e9 Fixed ClientId initialisation issue.
Added ClientIdProvider (rely on ProtonCookieStore).
2021-06-03 17:18:11 +02:00
Neil Marietta 646183da63 Refactored HumanVerification.
Never delete HumanVerification tokens except on Invalid Verification Code (error 12087).

HumanVerification Network Handlers:
- HumanVerificationNeededHandler: call onHumanVerificationNeeded on error 9001 (last of error handler list).
- HumanVerificationInvalidHandler: call onHumanVerificationInvalid (which delete token) on error 12087.
2021-06-03 17:18:11 +02:00
dkadrikj 98ca99f9a6 Various improvements for Signup and Presentation.
Various improvements for User, Human Verification and Presentation modules.
Various improvements for User, Human Verification and Presentation modules.
Remove PayloadRequest.kt.
Update tests suite.
Remove not used files NewUser.kt and NewExternalEmailUser.kt
Take out create address from UserManager.kt
User emailSplit extension instead.
Introduce CreateUserType.kt
Move HumanVerificationResult handler into the ViewModel.
Fix wait to DB write HV ViewModel.
Improve SetupPrimaryKeys.kt.
Fix HV tests.
2021-05-12 21:07:28 +02:00
dkadrikj 6876980bbc Refactor human verification module.
Remove human verification dependency in account manager and make it independent.
2021-05-12 17:57:14 +00:00
dkadrikj 225876b18b Add new countries module (with submodules) for easier usage in any other module (or client). 2021-03-29 13:24:00 +02:00
dkadrikj 2d998fa913 Update presentation module.
- Improve clickable adapter
- Add more validation utils (credit card)
- Add support for custom icon for Proton Input

Improve ProtonInput.kt, ProtonInputEndButtonAction.kt and styles.xml.

Convert end icon ProtonInput.kt functions into a properties.

Fix detekt issues.

Update Human Ver and Data modules.

- move readFromAssets to data module

Set new name AssetReader.kt

Set endIconDrawable from constructor.
2021-03-29 13:23:01 +02:00
dkadrikj 41d5cb8bf0 Refactor cert pins (npe on calendar). 2020-12-18 14:35:55 +01:00
dkadrikj 6af3cf0553 Refactor ApiProvider so that client is able to inject cert pins. 2020-12-15 13:48:02 +01:00
Neil Marietta fe864413e3 Reverted to default Kotlin Serialization "encodeDefaults = false" value. 2020-11-19 14:33:51 +01:00
Neil Marietta bf33818a5a Integrated AccountManager with modules. 2020-11-02 10:38:21 +01:00
Neil Marietta 0fa57dff20 Removed ExperimentalCoroutinesApi annotation (see build.gradle.kts, kotlinCompilerArgs). 2020-11-02 10:33:09 +01:00