Commit graph

1533 commits

Author SHA1 Message Date
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
84afcb183f
Update CHANGELOG
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
GitHub Actions
5bc72e8958
Prepare release 1.11.0 2020-08-18 21:16:37 +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
e2a372bc63
build: update openpgp-ktx to 2.1.0 (#1025) 2020-08-17 13:28:43 +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
Harsh Shandilya
7bb40d109a
build: update to Kotlin 1.4 (#1021)
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-08-15 22:45:31 +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
Harsh Shandilya
2732f9093e
github: set git config for PSL workflow (#1018)
user.name and user.email are not set by default in a standard Actions workflow

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-08-13 16:17:04 +05:30
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
Fabian Henneke
edec55dc8c
Downgrade coroutines to 1.3.6 to fix VerifyErrors 2020-07-31 09:45:02 +02:00
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
GitHub Actions
cccf3e39ec Prepare release 1.10.2 2020-07-30 08:58:45 +00:00
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
Harsh Shandilya
017abd0f61
Add ability to change default branch (#977)
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-07-29 16:25:49 +05:30
Harsh Shandilya
729fc80255
github: fix derp in PSL update workflow (#983) 2020-07-29 13:08:38 +05:30