Commit graph

1213 commits

Author SHA1 Message Date
Harsh Shandilya
e18416fa0e
SshKey: use runCatching to replace exception handling
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-05 22:49:37 +05:30
Harsh Shandilya
e6675d989d
SshjSessionFactory: use runCatching to replace exception handling
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-05 22:49:37 +05:30
Harsh Shandilya
ee6fd10ea6
GitOperation: use runCatching to replace exception handling
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-05 22:49:36 +05:30
Harsh Shandilya
58f28727c1
GitLogModel: use runCatching to replace exception handling
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-05 22:49:36 +05:30
Harsh Shandilya
4082be7721
AutofillPublisherChangedActivity: use runCatching to replace exception handling
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-05 22:49:36 +05:30
Harsh Shandilya
c62e1303b1
AutofillScenario: use runCatching to replace exception handling
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-05 22:49:35 +05:30
Harsh Shandilya
82c83a5bed
GitSettings: use runCatching to replace exception handling
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-05 22:49:35 +05:30
Harsh Shandilya
83654896b6
PasswordRepository: use runCatching to replace exception handling
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-05 22:49:34 +05:30
Harsh Shandilya
5951a983b1
GitConfigActivity: use runCatching to replace exception handling
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-05 22:49:05 +05:30
Harsh Shandilya
361a801e47
GitServerConfigActivity: use runCatching to replace exception handling
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-05 22:49:05 +05:30
Harsh Shandilya
2d4c165f15
GetKeyIdsActivity: use runCatching to replace exception handling
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-05 22:49:04 +05:30
Harsh Shandilya
117b5e1d3b
SelectFolderFragment: use runCatching to replace exception handling
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-05 22:49:04 +05:30
Harsh Shandilya
2041ec3f19
Extensions: use runCatching to replace exception handling
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-05 22:49:03 +05:30
Harsh Shandilya
730da7ef0f
Otp: use runCatching to replace exception handling
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-05 22:49:03 +05:30
Harsh Shandilya
104c6550f6
UserPreference: use runCatching to replace exception handling
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-05 22:49:03 +05:30
Harsh Shandilya
9bc1d59dd2
PasswordBuilder: use runCatching to replace exception handling
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-05 22:49:02 +05:30
Harsh Shandilya
85d1ef1ad1
PasswordStore: use runCatching to replace exception handling
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-05 22:49:02 +05:30
Harsh Shandilya
07607e0f37
PasswordFragment: use runCatching to replace exception handling
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-05 22:49:02 +05:30
Harsh Shandilya
5896acc8eb
ClipboardService: use runCatching to replace exception handling
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-05 22:49:01 +05:30
Harsh Shandilya
63e2908d36
Migrations: use runCatching to replace exception handling
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-05 22:49:01 +05:30
Harsh Shandilya
c3e6006895
AutofillSmsActivity: use runCatching to replace exception handling
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-05 22:49:01 +05:30
Harsh Shandilya
90c9ce1b91
Form: use runCatching to replace exception handling
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-05 22:49:00 +05:30
Harsh Shandilya
0bc60999c3
AutofillDecryptActivity: use runCatching to replace exception handling
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-05 22:49:00 +05:30
Harsh Shandilya
8ed6dad23c
OnboardingActivity: use runCatching to replace exception handling
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-05 22:48:59 +05:30
Harsh Shandilya
2db640d6cb
SshKeyGenActivity: use runCatching to replace exception handling
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-05 22:48:59 +05:30
Harsh Shandilya
32cb1b3af3
Migrations: reuse SharedPreferences instances
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-05 22:48:59 +05:30
Harsh Shandilya
3ac9c7d8e7
PasswordRepository: add custom FS factory for symlink capabilities (#1081)
Co-authored-by: Fabian Henneke <fabian@henneke.me>
2020-09-05 22:48:42 +05:30
Harsh Shandilya
6713d48974
DecryptActivity: properly calculate remaining OTP time on first pass (#1080)
* DecryptActivity: properly calculate remaining OTP time on first pass

We default to 30 seconds for each recalculation but the first run might not have 30 seconds left in its period, making the value stale much earlier. While most websites offer another 30 seconds of validity for TOTP codes, many do not, thus making it hard to enter a correct OTP

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>

* Update changelog

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-05 20:12:19 +05:30
github-actions[bot]
0b85779eec
Update Public Suffix List data (#1079) 2020-09-05 07:36:32 +05:30
Harsh Shandilya
0d2c6654d3
Assorted UX improvements (#1077)
* CredentialFinder: allow seeing password when retrying

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>

* GitOperation: bail out early when SSH key is missing

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>

* OnboardingActivity: finish all activities in onBackPressed

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>

* Update CHANGELOG

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-04 12:19:45 +02:00
Fabian Henneke
4214b7fbb4
Add migration to new SshKey backend (#1076)
Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-04 14:46:05 +05:30
Harsh Shandilya
e731943437
Revamp onboarding logic (#1068) 2020-09-04 12:06:55 +05:30
Harsh Shandilya
b7f58cfb6e
Remove BaseGitActivity's onOptionsItemSelected override (#1075)
Each activity that inherits from it should handle its own navigation

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-04 11:47:50 +05:30
Fabian Henneke
3840f43fa0
Refactor Git operations and auth (#1066)
Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-03 14:18:14 +05:30
Fabian Henneke
cbb96397d1
Add Keystore backend for SSH public key authentication (#1070) 2020-09-01 13:42:27 +05:30
Alexander Kirillov
55d64fb737
Simplify decrypt intent creation (#1069) 2020-08-29 20:18:56 +05:30
Nosweh
0f0d1994e5
Add Activity to view the Git commit log (#1056) 2020-08-28 21:01:40 +05:30
Fabian Henneke
88b1de2b50
Do not return stored password on first retry (#1061) 2020-08-27 21:05:26 +05:30
Harsh Shandilya
c848788f05
Merge remote-tracking branch 'origin/release' into develop
* origin/release:
  build: bump version
  build: drop -free suffix
  Remember HTTPS password throughout a sync operation (#1062)

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-08-27 19:25:06 +05:30
Harsh Shandilya
7b4792d147
build: bump version
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-08-27 17:58:17 +05:30
Harsh Shandilya
cc97f64ff2
build: drop -free suffix
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-08-27 17:57:18 +05:30
Fabian Henneke
8c5cd0b7e5
Remember HTTPS password throughout a sync operation (#1062)
* Remember HTTPS password throughout a sync operation

* Add CHANGELOG.md entry

Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>
(cherry picked from commit cba0bc2b29)
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-08-27 17:36:13 +05:30
Fabian Henneke
cba0bc2b29
Remember HTTPS password throughout a sync operation (#1062)
* Remember HTTPS password throughout a sync operation

* Add CHANGELOG.md entry

Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>
2020-08-27 15:43:55 +05:30
Fabian Henneke
1093928d93
Delete HTTPS instead of SSH key password on error (#1060) 2020-08-27 15:21:15 +05:30
Harsh Shandilya
1ce3ef4ea3
Expand show hidden folders to also cover files (#1059)
* PasswordItem: only strip .gpg suffixes

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>

* Add preference key and migration for showing all hidden contents

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>

* Allow showing both hidden files and directories

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>

* Add tests for hidden folder setting migration

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>

* Add changelog entry

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>

* Slightly improve migration logic

Skip migration if old key is not found and always delete the previous key even if its set to false.

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>

* Tweak wording

Suggested-by: Fabian Henneke <fabian@henneke.me>
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>

* Assert previous key's removal in tests

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-08-27 14:27:55 +05:30
Fabian Henneke
8ec3320df7
Get rid of explicit Git server protocol (#1054)
* Double check Git server protocol

Ensure that the Git server protocol is not at odds with the URL scheme.

Also move the Protocol switches below the URL to make it clear that the
URL should be entered first.

* Remove protocol selection from server config

The protocol is now extracted from the URL, and the authentication mode selection is validated by GitSettings

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>

* Don't use pref values for auth modes

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>

* Apply suggestions from code review

Remove now unused protocol mismatch result type

Co-authored-by: Fabian Henneke <FabianHenneke@users.noreply.github.com>

* Simplify migration logic and fix tests

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>

* Revert "Simplify migration logic and fix tests"

This reverts commit 1c4c4ba5fbc212843cb6b74dd29ac858eaea7582.

* Detect URLs with null scheme as ssh

* Add changelog entry

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>

Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>
Co-authored-by: Harsh Shandilya <msfjarvis@gmail.com>
2020-08-26 19:51:27 +05:30
Fabian Henneke
ad17fa7cc5
Rename ConnectionMode to AuthMode and remove clone_ prefix (#1053) 2020-08-26 13:36:36 +05:30
Fabian Henneke
d0b15cec49
Improve Git server config activity (#1051) 2020-08-24 15:33:33 +05:30
Harsh Shandilya
cbe780f31c
Merge branch 'release' into backmerge-release
* release:
  build: bump version
  Add changelog entry for HTTPS authentication
  Return HTTPS URI username from CredentialsProvider (#1049)
  Prevent racing double commits on password creation (#1047)
  Prepare release 1.11.2
2020-08-24 13:35:05 +05:30
Harsh Shandilya
4a4e48dc34
build: bump version
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-08-24 12:46:03 +05:30
Fabian Henneke
e4ce435f00
Return HTTPS URI username from CredentialsProvider (#1049)
Let the PasswordFinderCredentialsProvider support Username as a
CredentialItem type and return the user part of the repository URI when
it is requested.

(cherry picked from commit 679037b81d)
2020-08-24 12:46:02 +05:30
Fabian Henneke
a29414fce6
Prevent racing double commits on password creation (#1047)
Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>
(cherry picked from commit 2c8999c1bf)
2020-08-24 12:46:01 +05:30
Fabian Henneke
679037b81d
Return HTTPS URI username from CredentialsProvider (#1049)
Let the PasswordFinderCredentialsProvider support Username as a
CredentialItem type and return the user part of the repository URI when
it is requested.
2020-08-24 12:41:40 +05:30
Fabian Henneke
2c8999c1bf
Prevent racing double commits on password creation (#1047)
Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>
2020-08-23 22:21:36 +05:30
Harsh Shandilya
06497f1db0
BiometricAuthenticator: also allow Class 2 biometric implementations (#1046)
Android OEMs are hellspawn

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-08-23 13:40:13 +02:00
Harsh Shandilya
2414c48d9f
BiometricAuthenticator: fix multiple regressions from AndroidX update (#1045)
Fixes: 80e43e5675 ("Update dependencies (#1039)")
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-08-23 16:41:04 +05:30
Harsh Shandilya
70aa41ae61
Don't use git config for setting author and email (#1043)
Fixes #1038

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-08-22 18:13:06 +05:30
Devin J. Pohly
70f7d3b199
Autofill: add support for Bromite and Ungoogled Chromium (#1041) 2020-08-22 15:18:44 +05:30
Harsh Shandilya
80e43e5675
Update dependencies (#1039)
* build: uprev dependencies

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>

* Address deprecation warnings

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>

* Update autofill, appcompat and core

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-08-21 21:48:53 +05:30
Nosweh
cf5310e0fb
Wrap password creation layout in ScrollView (#1036) 2020-08-21 02:14:31 +05:30
Harsh Shandilya
92f80b2e3d
Merge branch 'release' into develop
* release:
  build: bump version
  Update CHANGELOG
  Revert "Reland symlink support (#1020)"

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-08-21 01:33:24 +05:30
Harsh Shandilya
d9c3aff6d3
build: bump version
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-08-21 01:11:13 +05:30
Harsh Shandilya
7a7e58f6dd
Revert "Reland symlink support (#1020)"
This does not work below API 27.

Fixes #1032

This reverts commit 087ab547c1.
2020-08-21 01:11:06 +05:30
Harsh Shandilya
67ee24ef86
Fix incorrect preference key (#1033)
This too should have been base64 encoded

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-08-20 21:52:33 +05:30
Diogenes Molinares
cfb42f02f5
Sort by recently used (#1031)
* Sort passwords by recently used

* reformat

* modified CHANGELOG.md

* restore format CHANGELOG.md

* added new sharedPreferences file to manage recent password history

* associate timestamp when rename category

* associate timestamp when rename password

* reformat

* Update CHANGELOG.md

Co-authored-by: Fabian Henneke <FabianHenneke@users.noreply.github.com>

* Update app/src/main/java/com/zeapo/pwdstore/PasswordFragment.kt

Co-authored-by: Fabian Henneke <FabianHenneke@users.noreply.github.com>

* Update app/src/main/java/com/zeapo/pwdstore/PasswordFragment.kt

Co-authored-by: Fabian Henneke <FabianHenneke@users.noreply.github.com>

* use kotlin edit extension

* Add changelog entry correctly

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>

* Save paths as Base64 hashes

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>

* Missed it

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>

Co-authored-by: Fabian Henneke <FabianHenneke@users.noreply.github.com>
Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>
2020-08-20 17:23:34 +05:30
Fabian Henneke
152d86ec3a
Add SSHJ backend for OpenKeychain authentication (#995)
* Update sshj to 0.30.0 and improve algorithm order

Updates sshj to 0.30.0, which brings support for rsa-sha2-* key types
and bugfixes related to RSA certificates and Android Keystore backed
keys.

Along the way, this improves the algorithm preferences to be consistent
with the Mozilla Intermediate SSH configuration (as far as possible,
given that most certificate types and some encryption algorithms are
not yet supported).

We also add "ext-info-c" to the kex algorithm proposal to work around
certain kinds of "user agent sniffing" that limits the support of
rsa-sha2-* key types.

* Add SSHJ backend for OpenKeychain authentication

* Address review comments

Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>
2020-08-18 22:02:34 +02:00
Harsh Shandilya
bd0d97d242
build: prepare next development version
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-08-18 21:31:06 +05:30
Harsh Shandilya
80b3a15592
build: bump version
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-08-18 21:17:03 +05:30
Fabian Henneke
b3241f3452
Preserve SSH key passphrase on connection errors (#979)
* Update sshj to 0.30.0 and improve algorithm order

Updates sshj to 0.30.0, which brings support for rsa-sha2-* key types
and bugfixes related to RSA certificates and Android Keystore backed
keys.

Along the way, this improves the algorithm preferences to be consistent
with the Mozilla Intermediate SSH configuration (as far as possible,
given that most certificate types and some encryption algorithms are
not yet supported).

We also add "ext-info-c" to the kex algorithm proposal to work around
certain kinds of "user agent sniffing" that limits the support of
rsa-sha2-* key types.

* Preserve SSH key passphrase on connection errors

Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>
2020-08-18 07:52:27 +02:00
Fabian Henneke
14e3754ef3
Update sshj to 0.30.0 and improve algorithm order (#1026)
Updates sshj to 0.30.0, which brings support for rsa-sha2-* key types
and bugfixes related to RSA certificates and Android Keystore backed
keys.

Along the way, this improves the algorithm preferences to be consistent
with the Mozilla Intermediate SSH configuration (as far as possible,
given that most certificate types and some encryption algorithms are
not yet supported).

We also add "ext-info-c" to the kex algorithm proposal to work around
certain kinds of "user agent sniffing" that limits the support of
rsa-sha2-* key types.
2020-08-18 01:28:04 +05:30
glowinthedark
82ae0a8629
Allow adding digits and symbols in XkPasswd generator using mask-like values (#1023)
* - XkPasswordGeneratorDialogFragment: add symbol/number mask to allow appending numbers+symbols via a mask such as `ddds` which would generate random.password123!; position of `d` and `s` is not currently considered; only the count is relevant

* - update CHANGELOG.md

* - update CHANGELOG.md

* - rename constants

* Update CHANGELOG.md

Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>

* - add missing marginTop

* - add missing marginTop

Co-authored-by: null <null>
Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>
Co-authored-by: glowinthedark <glowinthedark>
Co-authored-by: Harsh Shandilya <msfjarvis@gmail.com>
2020-08-17 16:10:03 +05:30
Harsh Shandilya
12f6caef37
Also invert copy_on_decrypt preference value (#1024)
Fixes: e0350043d0 ("Disable automatic copy on decrypt by default (#1006)")
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-08-16 21:51:13 +05:30
Harsh Shandilya
2ffd1abb27
Fix external storage UX (#1022)
* build: update to Kotlin 1.4

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>

* UserPreference: finish if directory selection was triggered from an intent

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>

* PasswordStore: switch permission request to ActivityResultContracts

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>

* PasswordStore: fix activity reference

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>

* GitOperationActivity: make invalid values more obvious

Would have caught this issue much sooner if I had just done this

Fixes: 3d8cea5966 ("Improve permission handling logic (#732)")
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>

* Assorted collection of hackery to make external storage use palatable

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>

* Update changelog

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-08-15 22:46:02 +02:00
Fabian Henneke
087ab547c1
Reland symlink support (#1020)
* Add symlink support to JGit (#1016)

* Add symlink support to JGit

* Fix a typo

Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>

* Prevent crash when following a broken symlink

Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>
2020-08-14 13:27:16 +05:30
Harsh Shandilya
57f1c65fdf
Restore workaround for preventing empty commits (#1019)
* Revert "Add symlink support to JGit (#1016)"

This reverts commit 5032696cec.

* Restore workaround for empty commits and document commands

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>

* Update app/src/main/java/com/zeapo/pwdstore/git/GitCommandExecutor.kt
2020-08-13 22:16:47 +02:00
Fabian Henneke
5032696cec
Add symlink support to JGit (#1016)
* Add symlink support to JGit

* Fix a typo

Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>
2020-08-13 15:51:09 +05:30
Fabian Henneke
a1f3d118c9
Update R8 rules (#1017)
Removes superfluous dontwarn rules, adds relevant new ones and removes
a keep rule for SearchView that has meanwhile been added to the
dependency.
2020-08-13 14:53:03 +05:30
Fabian Henneke
4e8da9b5f9
Create only one SSH session per GitOperation (#1012) 2020-08-12 20:11:11 +05:30
Fabian Henneke
d08397872a
Improve Git error message handling (#1011)
Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>
2020-08-12 14:20:08 +05:30
Harsh Shandilya
372c0f3dbd
Improve clone operation semantics (#1010)
* Improve clone operation semantics

Fixes #1003

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>

* Update changelog

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-08-12 09:34:47 +02:00
Harsh Shandilya
52e2139f6a
Notify user when remote branch is up-to-date (#1009)
* Notify user when remote branch is up-to-date

Fixes #1000

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>

* Update changelog

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-08-11 23:18:54 +02:00
Fabian Henneke
15aa929802
Switch to URL-based Git config and refactor Git settings (#1008)
* Make Git config URL-based and refactor

* Use Kotlin style null handling for string prefs

* Also show an error if generated URL can't be parsed

* Add some testcases for migration strategy

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>

Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>
2020-08-11 18:11:39 +02:00
Harsh Shandilya
8f957ca994
Uprev Gradle and dependencies (#1007)
* build: uprev Gradle

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>

* build: uprev dependencies

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>

* app/proguard: remove Tink rules

I'm assuming the R8 problems fixed by the Tink upgrade cover this as well

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-08-11 10:33:30 +02:00
Harsh Shandilya
5715b59ed4
Replicate key selection flow for directory creation (#999)
* Replicate key selection flow

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>

* Review fixes

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>

* Set --user 0 in adb options to prevent automatically installing to work profile

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>

* Fix committing regression

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>

* Update changelog

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-08-10 19:19:01 +05:30
Harsh Shandilya
e0350043d0
Disable automatic copy on decrypt by default (#1006)
Fixes #476

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-08-10 18:48:11 +05:30
Harsh Shandilya
1c4ac91c6c
Prompt user to install OpenKeychain when missing (#1005)
* Prompt user to install OpenKeychain when missing

Fixes #996

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>

* Update changelog

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-08-10 18:11:16 +05:30
Fabian Henneke
3dace243e4
Refactor uses of applicationContext and startActivityForResult (#997)
* Refactor uses of applicationContext and startActivityForResult

This commit applies three types of refactoring:

1. Remove context argument from PasswordRepository companion functions
   by relying on Application.instance.
2. Introduce a sharedPrefs extension function on Context that returns
   the default SharedPreferences for the applicationContext.
3. Use OpenDocument() and OpenDocumentTree() contracts.

* Drop toPasswordItem argument
2020-08-06 14:28:20 +05:30
Harsh Shandilya
14c44bf584
Remove GitAsyncTask and replace with non-blocking coroutines (#865)
Co-authored-by: Fabian Henneke <fabian@henneke.me>
2020-08-05 19:02:24 +05:30
Harsh Shandilya
12a83e5c36
Merge branch 'release' into develop
* release:
  build: bump version
  Downgrade coroutines to 1.3.6 to fix VerifyErrors

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-07-31 13:37:25 +05:30
Harsh Shandilya
327e28bb57
build: bump version
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-07-31 13:34:18 +05:30
Harsh Shandilya
dc4a9cadc9
Switch to non-deprecated stdlib methods (#990)
min and max were deprecated in favor of minOrNull and maxOrNull respectively to match their names to the typical
naming format used by stdlib methods with nullable return types

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-07-31 13:06:54 +05:30
Harsh Shandilya
cea9f4b942
Merge branch 'release' into develop
* release:
  build: bump version
  Prepare release 1.10.2
  Fix two SMS Autofill crashes (#985)
  Fix TOTP import button check semantics (#982)
  Properly handle files without passwords (#969)
  Expand OTP and PasswordEntry tests (#968)

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-07-30 14:51:57 +05:30
Harsh Shandilya
1c7daff5ba
build: bump version
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-07-30 14:30:39 +05:30
Fabian Henneke
23158ce6da
Fix two SMS Autofill crashes (#985)
SMS OTP Autofill currently crashes for two reasons:

1.  Tasks.await has a precondition of not running on the UI thread.
2.  Exceptions thrown from Tasks are always wrapped into
    ExecutionExceptions and need to be unwrapped before they can be
    identified as ResolvableApiException.

This commit addresses both issues by making waitForSms a proper
coroutine using withContext and a custom wrapper around Task<T> that
relies on suspendCoroutine and automatically unwraps exceptions.

(cherry picked from commit 3afeff45d8)
2020-07-30 14:00:33 +05:30
Harsh Shandilya
c132cc98e6
Fix TOTP import button check semantics (#982)
* Improve TOTP checking semantics

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>

* Fix return label

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>

* update CHANGELOG

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>

* Move updateViewState() call outside with(binding) scope

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
(cherry picked from commit ecf96aa066)
2020-07-30 14:00:25 +05:30
Fabian Henneke
3afeff45d8
Fix two SMS Autofill crashes (#985)
SMS OTP Autofill currently crashes for two reasons:

1.  Tasks.await has a precondition of not running on the UI thread.
2.  Exceptions thrown from Tasks are always wrapped into
    ExecutionExceptions and need to be unwrapped before they can be
    identified as ResolvableApiException.

This commit addresses both issues by making waitForSms a proper
coroutine using withContext and a custom wrapper around Task<T> that
relies on suspendCoroutine and automatically unwraps exceptions.
2020-07-30 13:59:01 +05:30
Harsh Shandilya
64a6e0f4e9
Properly handle files without passwords (#969)
* Properly handle files without passwords

Fixes #967

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>

* Fix tests

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>

* Only look for TOTP URI

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
(cherry picked from commit 62dbc183d5)
2020-07-30 13:49:26 +05:30
Harsh Shandilya
35a8e8b42c
Expand OTP and PasswordEntry tests (#968)
(cherry picked from commit e3cf73885c)
2020-07-30 13:49:23 +05:30
Fabian Henneke
8481491994
Add "challenge" and "verification" to OTP heuristic terms (#984) 2020-07-30 10:00:35 +02:00
Harsh Shandilya
6ca02eb371
Upgrade to Kotlin 1.4 (#978)
* build: uprev to Kotlin 1.4

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>

* Remove explicit type argument

Not required anymore with Kotlin 1.4

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>

* build: enable Kotlin 1.4 language features

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>

* all: add trailing commas where reasonable

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>

Co-authored-by: Fabian Henneke <FabianHenneke@users.noreply.github.com>
2020-07-29 17:10:46 +05:30