Commit graph

1238 commits

Author SHA1 Message Date
SphericalKat
9fcbde2f07
chore(format): format code using spotless
Signed-off-by: SphericalKat <amolele@gmail.com>
2021-05-22 13:41:51 +05:30
SphericalKat
49d8183917
fix(tests): return null/default values from faked android sdk
fixes behaviour of getFilesDir

Signed-off-by: SphericalKat <amolele@gmail.com>
2021-05-17 14:45:34 +05:30
SphericalKat
bd09190786
refactor(extension): remove PreferenceManager dependency for getting preferences
should help when using faked SharedPreferences

Signed-off-by: SphericalKat <amolele@gmail.com>
2021-05-17 14:21:53 +05:30
Harsh Shandilya
285bf9d929
Move file reads in RV adapters to a background dispatcher
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2021-05-15 15:48:05 +05:30
Harsh Shandilya
7e2eb2425e
all: reformat with Spotless again
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2021-05-15 15:40:20 +05:30
Aditya Wasan
e6e52b3594
Show current copy timeout in settings (#1404)
Signed-off-by: Aditya Wasan <adityawasan55@gmail.com>
2021-05-11 20:04:12 +00:00
Harsh Shandilya
a57c013619
app: update GpgIdentifier tests
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2021-05-02 11:33:21 +05:30
Harsh Shandilya
905e45c50a
strings: sync with crowdin
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2021-05-02 06:34:59 +05:30
Harsh Shandilya
f834c754e6
Refactor openpgp-ktx to leverage coroutines (#1398)
* openpgp-ktx: leverage coroutines for async IPC

* Unwind nested dispatchers

* Fix name shadowing warning

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2021-04-30 23:22:01 +05:30
Harsh Shandilya
4880e1db27
Upgrade to Kotlin 1.5 (#1397)
* build: upgrade Kotlin to 1.5.0 and Hilt to 2.35.1

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

* all: address kotlin.time.seconds deprecation

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

* autofill-parser/openpgp-ktx: require Kotlin 1.5

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

* all: address string method deprecations

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

* build: disable NewApi lint

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2021-04-28 10:27:14 +05:30
Harsh Shandilya
d3bc28c1c3
Do not ASCII armor files when encrypting (#1396) 2021-04-25 09:17:40 +00:00
Harsh Shandilya
a5b6dfc106
Support creating pinned shortcuts directly (#1393)
* CHANGELOG: update for pinning support

* PasswordFragment: support pinning

* PasswordStore: use `PasswordItem#createAuthEnabledIntent`

* PasswordItem: add `createAuthEnabledIntent` API

* DecryptActivity: remove last changed time

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2021-04-21 18:10:19 +05:30
Harsh Shandilya
6ff01f5e1e
Refactor app shortcut handling (#1392) 2021-04-21 18:07:35 +05:30
Harsh Shandilya
53c3431ef0
Enable StrictMode in debug logging builds (#1391)
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2021-04-21 08:06:47 +00:00
Harsh Shandilya
213778122c
Migrate some tests to Robolectric (#1389)
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2021-04-19 17:13:12 +05:30
Harsh Shandilya
7710ca9024
Remove hand-rolled CoroutineScope and fix inverted conditions (#1386) 2021-04-18 08:45:45 +00:00
Harsh Shandilya
a3ebcfcc62
app: switch to format-common's PasswordEntry
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2021-04-18 04:22:52 +05:30
Harsh Shandilya
a0fdd6ddc3
app: configure Hilt and desugaring
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2021-04-18 04:03:17 +05:30
Harsh Shandilya
af9f1fc374
Sync localisations from Crowdin (#1379)
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2021-04-10 11:26:10 +05:30
Harsh Shandilya
023f03a227
Declare and check for camera features (#1375)
* app: set feature requirements

* Don't offer QR import option if no camera is present

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2021-04-08 04:21:53 +05:30
Harsh Shandilya
e13a54f212
Refactor biometric preference handling (#1374)
Fixes #1371

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2021-04-07 13:53:21 +00:00
Amogh Lele
7acbf0eda8
Switch to sublime text's fuzzy matching (#1372)
* refactor(search): use sublime text's fuzzy matching algorithm

Signed-off-by: SphericalKat <amolele@gmail.com>

* chore(changelog): update

Signed-off-by: SphericalKat <amolele@gmail.com>

* build: fetch sublime-fuzzy from Maven Central

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

* chore(changelog): update

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

Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>
2021-04-07 11:02:41 +05:30
Harsh Shandilya
cf5f0eae3a
Actively discourage use of git protocol (#1368) 2021-04-03 19:51:34 +00:00
schiermi
62b514cae4
Minor adjustment of german translation. (#1362)
"Shop" sounds strange, especially in Autofill.
2021-03-30 09:16:55 +05:30
Harsh Shandilya
f5450eb5fd
DecryptActivity: use correct TOTP period (#1359)
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2021-03-26 22:51:48 +05:30
Fabian Meumertzheim
44d27333a7
Do not cancel keygen biometric prompt on failure (#1357)
Biometric authentication may very well fail a few times due to e.g.
using the wrong finger, but that should not cancel the key generation
flow. The BiometricAuthenticator UI gracefully handles the error case
for us with an informative message.

Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>
2021-03-21 08:44:37 +00:00
Harsh Shandilya
db4683e0d6
Inform users that GPG key selection is mandatory (#1355)
* Inform users that GPG key selection is mandatory

Fixes #1342

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

* changelog: sync for 1.13.4 release

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

* changelog: add GPG key selection improvements

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2021-03-21 14:03:51 +05:30
Harsh Shandilya
df17d6140b
Fix launcher shortcut icon rendering
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2021-03-20 17:32:53 +05:30
Harsh Shandilya
940cdd9750
app: remove lingering resource directory
The mapping was fixed on Crowdin but this wasn't deleted manually resulting in build failures

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2021-03-20 17:17:06 +05:30
Harsh Shandilya
42672b599b
strings: sync with crowdin
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2021-03-20 14:58:18 +05:30
Harsh Shandilya
7f757bed81 app: fix nonFree resources
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2021-03-20 12:35:17 +05:30
Harsh Shandilya
91fce4dce7
all: format XML files to 2 space indent
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2021-03-18 11:40:30 +05:30
Harsh Shandilya
774fda83ac
all: reformat with ktfmt
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2021-03-18 11:40:30 +05:30
Harsh Shandilya
be31ae37f4
all: update copyrights
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2021-03-18 11:26:48 +05:30
Harsh Shandilya
197af98bb5
Append trailing newline to .gpg-id during creation (#1344) 2021-03-13 03:05:03 +05:30
Aditya Wasan
d17ff0d925
Parse extra content into key value pairs (#1321)
* ui: add skeleton recyclerview to parse extra content

Signed-off-by: Aditya Wasan <adityawasan55@gmail.com>

* ui: add recyclerview and update PasswordEntry to create map of key-value pairs

Signed-off-by: Aditya Wasan <adityawasan55@gmail.com>

* password-entry: When key-value pair is not correctly formed, display it as Extra Content

Signed-off-by: Aditya Wasan <adityawasan55@gmail.com>

* Fix formatting

Signed-off-by: Aditya Wasan <adityawasan55@gmail.com>

* bug: update otp code on main thread

Signed-off-by: Aditya Wasan <adityawasan55@gmail.com>

* Add complete string if key-value pair cannot be formed

Signed-off-by: Aditya Wasan <adityawasan55@gmail.com>

* test: add a few tests for key-value parsing logic

Signed-off-by: Aditya Wasan <adityawasan55@gmail.com>

* prefs: remove SHOW_EXTRA_CONTENT from shared preferences

Signed-off-by: Aditya Wasan <adityawasan55@gmail.com>

* Update CHANGELOG.md

* Cleanup and refactor

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

* PasswordEntryTest: silence nullability warning

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

* PasswordEntry: simplify constructor

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

* PasswordEntry: annotate test-enablement visibility

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

* Reintroduce the catch-all field

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

* update parsing logic

Signed-off-by: Aditya Wasan <adityawasan55@gmail.com>

* add one more test case

Signed-off-by: Aditya Wasan <adityawasan55@gmail.com>

* Add missing newlines

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

* Remove unnecessary scrollview

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

* rv: do not return if hasExtraContent is false

Signed-off-by: Aditya Wasan <adityawasan55@gmail.com>

* Don't anchor RV to bottom

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

Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>
2021-02-19 08:27:57 +00:00
Harsh Shandilya
92ece7dbb5
Implement manual TOTP import and cleanup password generators (#1320) 2021-02-18 12:17:03 +05:30
Harsh Shandilya
051d455c9f
Add tests for GPG identifier parsing (#1319) 2021-02-15 13:05:09 +05:30
Harsh Shandilya
7fbe4be711
Update to SSHJ 0.31.0 (#1314)
Co-authored-by: Fabian Henneke <fabian@hen.ne.ke>
2021-02-10 13:00:30 +05:30
Harsh Shandilya
ea24056554
Redo authentication modes UI with Chips (#1297) 2021-02-07 12:49:00 +05:30
Harsh Shandilya
318aeae500
Rework clear clipboard feature (#1295)
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2021-02-03 01:25:34 +05:30
Harsh Shandilya
4694c5ac85
Fix app shortcuts not updating (#1292) 2021-01-31 13:45:14 +05:30
Harsh Shandilya
1f8db46ade
Disallow overwriting passwords when editing (#1286)
Co-authored-by: Aditya Wasan <adityawasan55@gmail.com>
2021-01-27 11:12:23 +05:30
github-actions[bot]
94420210f9
strings: sync with crowdin (#1284) 2021-01-23 02:54:51 +00:00
Harsh Shandilya
33d3683ae2
Codestyle churn (#1283)
* editorconfig: delete

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

* idea: adjust codestyle

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

* all: reformat with simplified import ordering rules

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2021-01-22 22:58:09 +05:30
Harsh Shandilya
1e9e5686af
Allow configuring pull behaviour (#1276) 2021-01-12 21:42:53 +05:30
Harsh Shandilya
8bd156dea6
Rework settings to use ModernAndroidPreferences (#1236)
Co-authored-by: Fabian Henneke <fabian@hen.ne.ke>
2021-01-12 11:19:28 +05:30
Harsh Shandilya
91e00d897f
app: cleanup how we handle menu item presses (#1275)
Fixes #1274

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2021-01-08 19:43:52 +05:30
Aditya Wasan
534269c8fc
Fix auth modes not displaying properly (#1271)
* res: fix auth modes not displaying properly

Signed-off-by: Aditya Wasan <adityawasan55@gmail.com>

* res: wrap onboarding flow screens inside ScrollView

Signed-off-by: Aditya Wasan <adityawasan55@gmail.com>
2021-01-08 03:38:45 +05:30
Fabian Meumertzheim
0943015416
Show less obvious Autofill actions first (#1268)
Show Generate and Fill SMS OTP Autofill actions before the more
uninteresting (and expected) Search action.
2021-01-03 21:00:30 +05:30
Harsh Shandilya
fa2279791f
Revert "Refactor GitCommandExecutor (#1255)" (#1267)
This breaks propagation of errors to the UI layer

This reverts commit c34d08b094.
2021-01-01 23:03:13 +05:30
Harsh Shandilya
1a774eae23
Automate Crowdin localisation sync (#1265)
* build: add a Gradle plugin for Crowdin

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

* build/crowdin: add skipCleanup extension property

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

* build/crowdin: also handle nonFree source set

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

* build/crowdin: fixup directory names for nonFree variant

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

* app: sync translations from Crowdin

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

* github: add Crowdin sync workflow

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-12-30 11:06:51 +01:00
Harsh Shandilya
37c8b416d5
Sync localisations with Crowdin (#1256)
Fixes #1254

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-12-21 11:48:08 +05:30
Harsh Shandilya
c34d08b094
Refactor GitCommandExecutor (#1255)
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-12-20 05:52:30 -08:00
Harsh Shandilya
0396bf92a9
Transform broken repo error message to be more helpful (#1251) 2020-12-17 23:38:31 +05:30
Harsh Shandilya
ce2e657108
Better guidance for users to deal with host key changes (#1242)
* Provide actionable guidance for host key mismatches

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

* Update changelog

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

* Hide host key clear button after use

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-12-10 22:47:18 +05:30
Harsh Shandilya
c02ad427be
Try to fix missing .gpg-id files as well (#1246) 2020-12-10 21:06:45 +05:30
Fabian Meumertzheim
2e43d77c5c
Mark Chrome Canary as non-flaky and allowing save (#1237)
* Mark Chrome Canary as non-flaky and allowing save

* autofill-parser: update API dump

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

* autofill-parser: bump snapshot version

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

Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>
2020-12-07 08:48:16 +01:00
Harsh Shandilya
5e66d99c85
Refactor package structure (#1233)
* idea: default test runner to Gradle

* Kick off package structure revamp

* Reparent all classes under dev.msfjarvis.aps

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-12-05 06:07:18 +05:30
Harsh Shandilya
77e77be999
Set 10 second timeout on JGit transport commands (#1230)
* GitOperation: set a 10 second connection timeout

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

* Update changelog

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-12-03 12:22:22 +01:00
Aditya Wasan
993b203676
Use countdown chronometer on API 24 and above (#1228)
* Use countdown chronometer on API 24 and above

Signed-off-by: Aditya Wasan <adityawasan55@gmail.com>

* Do not use SharedPreferences inside ClipboardService

ClipboardService run in it's own process and SharedPreferences do not support multiple processes. Due to this changes in notificaion clear time are not reflected to the ClipboardService. This commit fixes that by passing time explicitly from the main app process.

Signed-off-by: Aditya Wasan <adityawasan55@gmail.com>
2020-12-02 09:11:42 +05:30
Harsh Shandilya
31a11a1ebb
GitCommandExecutor: make committer match author (#1226)
* GitCommandExecutor: make committer match author

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

* Add changelog entry

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-12-01 20:54:01 +05:30
Harsh Shandilya
ed0fc19725
build: upgrade dependencies
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-11-30 13:57:58 +05:30
Harsh Shandilya
a9c73f1e51
Automatically dismiss decryption screen after 60 seconds (#1216)
* Automatically dismiss decryption screen after 60 seconds

Fixes #1215

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

* Update changelog

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-11-22 11:47:39 +05:30
Harsh Shandilya
544631da04
App shortcut fixes (#1213) 2020-11-21 00:20:11 +05:30
Fabian Henneke
02c853c3b1
Fix Autofill dataset icon tint (#1207)
ImageViews in RemoteViews require tint to be specified with the android:
prefix, the lint thinks otherwise.
2020-11-15 13:10:06 +05:30
Harsh Shandilya
df6ebfee27
Fix extra content for multiple username fields (#1192)
Fixes #1190

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-11-06 10:50:34 +05:30
Harsh Shandilya
354687e3a6
Resolve Autofill breakage below API 30 (#1187)
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-11-05 01:50:32 +05:30
Fabian Henneke
0a71cc8aa5
Fix Autofill regression caused by empty dataset (#1184) 2020-11-03 22:10:31 +05:30
Fabian Henneke
73648b39d0
Make autofill-parser API explicit and refactor (#1182) 2020-11-03 13:36:17 +05:30
Fabian Henneke
1d13a1fbd6
Improve Autofill UI and enable inline presentations (#1181)
* Improve Autofill UI and enable inline presentations

Improves the Autofill UI in the following ways:

* Add support for Android 11 inline presentations of Autofill datasets.
* Instead of showing the identifier (app name or web origin) of the
current app on top of every Autofill dataset, it is now shown 1) as a
header dataset on Android 9 and 10 as well as 2) at the top of the
search activity on all supported versions of Android. Rationale: The
identifier is only used in trust decisions when choosing an existing
entry to fill and should feature prominently in that view, not
elsewhere.
* Show the actual identifier part of a matched entry's path, which may
differ from the identifier of the matched app/website.
* Slightly tweak the labels of Search/Generate Autofill actions to
indicate that a) this is about entries and b) the user may skip the
generation of a password and supply a custom one as well.

* Suppress lint error

* Address review comments

* Add a fixme about properly handling fill-in datasets

* CHANGELOG: add entry for inline presentation

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

* Remove unused parameter

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

Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>
2020-11-02 20:25:37 +01:00
Harsh Shandilya
cff8d41c91
build: compile against SDK 30 and resolve deprecations
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-11-01 22:51:02 +05:30
Fabian Henneke
03959cca4d
Finish activity when Autofill Generate is cancelled (#1179) 2020-10-31 12:01:18 +01:00
Joris Minjat
38ece10e0d
Minimal support for MIME secret encoding (#1170)
Co-authored-by: Fabian Henneke <FabianHenneke@users.noreply.github.com>
2020-10-23 21:43:37 +05:30
Harsh Shandilya
66b31f1432
Workaround AndroidX lifecycle requirements in OpenKeychain auth (#1168)
* Workaround AndroidX lifecycle requirements in OpenKeychain auth

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

* CHANGELOG: add OpenKeychain fix

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

Co-authored-by: Fabian Henneke <FabianHenneke@users.noreply.github.com>
2020-10-23 15:23:47 +05:30
Harsh Shandilya
c513722a30
Rollback automatic synchronization feature (#1165)
* Revert "Add option to automatically sync repository on app launch (#1137)"

Fixes #1163

This reverts commit 92f1aab25d.

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

* CHANGELOG: add entry for auto sync rollback

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-10-23 07:29:42 +02:00
Harsh Shandilya
4a9151870d
Remove accessibility autofill support (#1162)
* autofill: remove Accessibility backend

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

* CHANGELOG: update

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-10-22 23:38:47 +05:30
Harsh Shandilya
440caab622
GitServerConfigActivity: add quick-fix for HTTPS URLs with custom ports
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-10-21 06:21:19 +05:30
Harsh Shandilya
f2d0c18672
GitServerConfigActivity: set auth mode visibility on launch as well
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-10-21 06:21:19 +05:30
Harsh Shandilya
30c8c27770
Convert PasswordRepository to an object
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-10-19 00:11:28 +05:30
Harsh Shandilya
95d53e495c
PasswordRepository: split out PasswordSortOrder
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-10-19 00:11:28 +05:30
Harsh Shandilya
12fe561be7
PasswordStore: Remove unnecessary class-level variables
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-10-19 00:11:28 +05:30
Harsh Shandilya
543cf5675a
Rollback string changes from #1157
These should never have been made

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-10-18 04:02:45 +05:30
ashoksinghal
3981638e0f
Use BottomSheet in place of Snackbar for longer messages (#1157) 2020-10-17 22:09:34 +05:30
Harsh Shandilya
6c1e41ba10
Revamp build configuration (#1156)
* release: move scripts to scripts directory

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

* Move CI secrets to secrets directory

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

* gradle: uprev to 6.7

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

* gradle: suppress warnings about unsupported options

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

* build: update dependencies

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

* build: move Gradle plugins to ext

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

* build: move configuration tasks to buildSrc

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

* CHANGELOG: add entry for #1137

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

* Fix lint warnings

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-10-16 17:18:11 +02:00
Aditya Wasan
92f1aab25d
Add option to automatically sync repository on app launch (#1137)
* Add option to automatically sync repository on app launch

Signed-off-by: Aditya Wasan <adityawasan55@gmail.com>

* Pull repo if user is not authenticated

Signed-off-by: Aditya Wasan <adityawasan55@gmail.com>

* Address review comments

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

* Hijack incoming intent rather than copying it

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

* Initialize password repository before using it

Signed-off-by: Aditya Wasan <adityawasan55@gmail.com>

Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>
2020-10-15 20:46:39 +05:30
Harsh Shandilya
591bb4e795
ProxyUtils: correctly handle the 'no proxy' case (#1148)
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-10-11 19:16:48 +05:30
Harsh Shandilya
e139e65a6e
res: merge unneeded override into base file
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-10-10 12:25:07 +05:30
Fabian Henneke
0d2788ab54
Temporarily work around SSHJ compatibility issues (#1142)
Using ECDSA either as a key exchange or a host key algorithm fails with
SSHJ 0.30.0 on Android, but should again become possible in 0.31.0.

While we wait for the release, demote ECDSA in the list of key
algorithms (as it should still be available for public key auth) and
remove it from the list of key exchange algorithms.
2020-10-08 21:24:18 +05:30
Harsh Shandilya
b4f6fc502a
Introduce app-wide HTTPS proxy setting (#1134) 2020-10-08 17:15:39 +05:30
Fabian Henneke
a321bb6403
Show new FillResponse right after publisher reset (#1138)
If Autofill shows a warning about an app whose publisher changed and the
user decides to trust the app and clear previous matches, they should
immediately be given the option to select a new match.

Previously, as AutofillPublisherChangedActivity did not return a
result, the old FillResponse with just a warning would be reused. We
now pass a useful response with no matches on to the activity, which
returns it after the user has chosen to reset the publisher info.
2020-10-06 15:18:00 +05:30
Harsh Shandilya
15042687f8
Fix Autofill publisher changed layout (#1136)
* Fix Autofill publisher changed layout

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

* Tweak autofill publisher UI

Signed-off-by: Aditya Wasan <adityawasan55@gmail.com>

Co-authored-by: Aditya Wasan <adityawasan55@gmail.com>
2020-10-06 11:29:23 +05:30
Harsh Shandilya
3ddd06679f
Resolve lock contention from lazy delegates (#1135) 2020-10-05 08:29:44 +05:30
Harsh Shandilya
cf03c55478
all: refactor ActivityResultContracts usages to adhere to API requirements
The newest versions of AndroidX Activity and Fragments correctly enforce the
requirement for all contracts to be registered at class init or before
the lifecycle has reached `Lifecycle.State.STARTED`. To comply with these requirements,
move all instances of `registerForActivityResult` being called at arbitrary points
in the code to be done at class init.

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-10-02 15:51:14 +05:30
Harsh Shandilya
d792fa5135
build: uprev dependencies
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-10-02 15:51:13 +05:30
Harsh Shandilya
14b51d5808
Add key selection step to onboarding flow
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-10-01 20:46:21 +05:30
Harsh Shandilya
944efee00e
PasswordCreationActivity: tweak logic for determining if identifier selection is needed
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-10-01 20:25:56 +05:30
Harsh Shandilya
98518ca499
Make unset author/email behavior match Git
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-10-01 20:25:56 +05:30
Harsh Shandilya
fbc9fde75e
Unwrap root cause for InvalidRemoteException (#1122)
* BaseGitActivity: unwrap root cause for InvalidRemoteException as well

JGit's InvalidRemoteException, like TransportException, swallows more
useful errors as is clear from this (redacted) snippet.

```
 D  org.eclipse.jgit.api.errors.InvalidRemoteException: Invalid remote: origin
 D      at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:26)
 D      at org.eclipse.jgit.api.PullCommand.call(PullCommand.java:41)
 D      at com.zeapo.pwdstore.git.GitCommandExecutor$execute$2$result$1.invokeSuspend(GitCommandExecutor.kt:2)
 D      at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:3)
 D      at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:15)
 D      at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:1)
 D      at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:13)
 D  Caused by: org.eclipse.jgit.errors.NoRemoteRepositoryException: ssh://msfjarvis@[fe80::dead:beef]:22/pass-repo: fatal: '/pass-repo'
    does not appear to be a git repository
 D      at org.eclipse.jgit.transport.TransportGitSsh.cleanNotFound(TransportGitSsh.java:14)
 D      at org.eclipse.jgit.transport.TransportGitSsh$SshFetchConnection.<init>(TransportGitSsh.java:20)
 D      at org.eclipse.jgit.transport.TransportGitSsh.openFetch(TransportGitSsh.java:1)
 D      at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:1)
 D      at org.eclipse.jgit.transport.Transport.fetch(Transport.java:20)
 D      at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:18)
```

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

* Add changelog entry

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-29 17:41:14 +02:00
Harsh Shandilya
6203855b15
Restore settings button to onboarding screen (#1119)
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-24 13:38:14 +05:30
Harsh Shandilya
56f4dedb5b
Sync strings from Crowdin (#1117)
* strings: sync from Crowdin

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

* Update changelog

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

* build: disable ImpliedQuantity lint

I hope our translators know better

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-22 09:18:00 +05:30
Harsh Shandilya
0a9b8fc585
Remove Autofill onboarding prompt and cleanup strings (#1116) 2020-09-21 23:44:52 +05:30
Harsh Shandilya
12db2d00df
Refactor auth mode check/uncheck (#1115)
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-21 19:26:34 +02:00
Harsh Shandilya
e8e0cc791f
Add check for potential issues with SSH URL
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-19 17:30:19 +05:30
Harsh Shandilya
5d5a068591
BasicBottomSheet: init
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-19 17:30:19 +05:30
Aditya Wasan
afbe29e7da
Finish activity in case of external directory (#1110)
Signed-off-by: Aditya Wasan <adityawasan55@gmail.com>
2020-09-19 01:08:59 +05:30
Harsh Shandilya
bad8e2b404
Misc cleanups to build and extension functions (#1108) 2020-09-18 18:14:52 +05:30
Aditya Wasan
9d63b11391
Add annotation to WelcomeFragment class (#1107)
Signed-off-by: Aditya Wasan <adityawasan55@gmail.com>
2020-09-18 16:21:27 +05:30
Vincent Breitmoser
0810273444
Autofill: Extract AutofillParser into separate subproject (#1101)
Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>
Co-authored-by: Fabian Henneke <fabian@henneke.me>
2020-09-16 23:47:55 +05:30
Aditya Wasan
4ba3b75f85
Update on-boarding UI (#1099)
* Add onboarding flow from v2

Signed-off-by: Aditya Wasan <adityawasan55@gmail.com>

* Minor fixes

Signed-off-by: Aditya Wasan <adityawasan55@gmail.com>

* Add changelog entry

Signed-off-by: Aditya Wasan <adityawasan55@gmail.com>

* Remove old activity from manifest

Signed-off-by: Aditya Wasan <adityawasan55@gmail.com>

* Remove view type prefix from view ids

Signed-off-by: Aditya Wasan <adityawasan55@gmail.com>

* Review fixes

Signed-off-by: Aditya Wasan <adityawasan55@gmail.com>

* Treewide: Reformat code

Signed-off-by: Aditya Wasan <adityawasan55@gmail.com>

* Moar review fixes

Signed-off-by: Aditya Wasan <adityawasan55@gmail.com>

* Revert "Treewide: Reformat code"

This reverts commit 348ef0050942526a55890b245afec8d7fee4d81e.

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

* onboarding: cleanup OnboardingActivity init

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

* Remove unused layout

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

* Remove unnecessary ConstraintLayout

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

* Shorten animation duration

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

* onboarding: use viewBinding extension in fragments

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

Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-15 21:53:12 +05:30
Harsh Shandilya
a34f749e9a
Add tentative workaround for dialog crashes and refactor Git-related code (#1100)
* Ensure we're creating dialogs on the main thread

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

* Remove unused operation type

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

* Refactor launchGitOperation to use an enum

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-14 22:37:22 +05:30
Harsh Shandilya
eef809760c
PasswordRepository: properly gate symlink feature (#1098)
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-13 15:24:15 +05:30
Harsh Shandilya
f2647dfbe6
Continue onboarding if permissions are granted prematurely (#1097)
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-12 19:28:42 +02:00
github-actions[bot]
dd63358b6a
Update Public Suffix List data (#1096)
Co-authored-by: FabianHenneke <FabianHenneke@users.noreply.github.com>
2020-09-12 11:41:40 +05:30
Harsh Shandilya
924443479e
Correctly count children in password list (#1095) 2020-09-11 15:02:12 +05:30
Fabian Henneke
7a58e397a9
Disable SSH multiplexing if not supported (#1093)
Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-11 13:28:03 +05:30
Rounak Datta
71fc2a396e
Autofill: add kiwi as a supported browser (#1091) 2020-09-10 11:24:44 +05:30
Harsh Shandilya
276aa4ea7c
Fix directory selection in onboarding if storage permissions are granted (#1090)
* OnboardingActivity: fix directory change option

Add an else clause to cover the case when storage permission is granted already

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

* all: rename permission grant method

The new name is a bit more explicit about its purpose

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

* UserPreference: add static method for external directory selection intent

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-09 07:57:03 +02:00
Fabian Henneke
9e0fb93f91
Support multiple authentication methods (#825)
* Offer password SSH authentication after publickey

* git: re-add back button handling

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

* Hide unsupported authentication methods

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

* GitCommandExecutor: cleanup and address build warning

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

* Address review comments

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

* DecryptActivity: hide menu items until decrypt finishes

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

* Add changelog entry

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

Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-08 15:38:06 +05:30
Aditya Wasan
ff780b02de
Use same checks as BiometricAuthenticator in UserPreference (#1088) 2020-09-08 14:24:19 +05:30
Harsh Shandilya
c65f3c7099
UX fixups and improvements (#1086)
* git: re-add back button handling

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

* Hide unsupported authentication methods

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

* GitCommandExecutor: cleanup and address build warning

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

* Address review comments

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

* DecryptActivity: hide menu items until decrypt finishes

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

* GitServerConfigActivity: don't finish on failure

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-07 16:43:04 +02:00
Fabian Henneke
2687763bda
Fix behavior on failing Git operations (#1084) 2020-09-07 13:40:59 +05:30
Harsh Shandilya
1d1bfbb5ad
PasswordGeneratorDialogFragment: use runCatching to replace exception handling
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-05 22:49:39 +05:30
Harsh Shandilya
bd49bcfb03
DecryptActivity: use runCatching to replace exception handling
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-05 22:49:38 +05:30
Harsh Shandilya
3a0bf37c00
PasswordCreationActivity: use runCatching to replace exception handling
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-05 22:49:38 +05:30
Harsh Shandilya
c183dd82d6
SshjConfig: use runCatching to replace exception handling
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-05 22:49:38 +05:30
Harsh Shandilya
eded073ef2
BasePgpActivity: use runCatching to replace exception handling
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-05 22:49:37 +05:30
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
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
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
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
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
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
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