Commit graph

1189 commits

Author SHA1 Message Date
Harsh Shandilya
6aea2501ba
build: bump version
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-07-22 15:01:50 +05:30
Harsh Shandilya
fb5f4e421d
Add pt-BR translations and cleanup resources (#947) 2020-07-22 13:37:36 +05:30
Fabian Henneke
511bfb0a9a
Use a more common SSH version string (#944) 2020-07-20 13:01:31 +02:00
Fabian Henneke
b9e6385751
Fix Autofill result contract bug (#941) 2020-07-19 22:09:41 +05:30
Harsh Shandilya
c7ccc2f4f1
Improve UI when launching with biometric lock (#940) 2020-07-19 16:37:18 +05:30
Harsh Shandilya
465d5b867a
Remove type images (#939)
* Remove type images

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

* Update changelog

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-07-19 10:25:34 +02:00
Harsh Shandilya
ffb47031b0
Always allow SSH key generation (#938) 2020-07-19 10:56:51 +05:30
Harsh Shandilya
d4379a4779
Remove manual key selection and start actually using .gpg-id (#916)
Co-authored-by: Aditya Wasan <adityawasan55@gmail.com>
Co-authored-by: Fabian Henneke <fabian@henneke.me>
2020-07-16 12:18:38 +05:30
Fabian Henneke
41ecdd7b08
Fix overly large horizontal margins on material switches (#935)
* Fix overly large horizontal margins on material switches

* Increase icon size for autofill filter view

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

Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>
2020-07-16 07:44:29 +02:00
Harsh Shandilya
1d7ec5ba6f
Add debug icon and update color palette (#931) 2020-07-14 16:23:39 +05:30
Fabian Henneke
681c557e9e
Revert "Work around Chrome Autofill issue (#921)" (#933) 2020-07-14 15:00:29 +05:30
Harsh Shandilya
4250cd499c
Properly guard against invalid renaming (#929) 2020-07-14 11:56:47 +05:30
Harsh Shandilya
7f3aceaf11
Fix navigation bar theming and reformat (#930) 2020-07-14 11:31:37 +05:30
Harsh Shandilya
fc00de61dc
Move password export to the IO dispatcher (#918)
* Move password export to the IO dispatcher

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

* Simplify snackbars and disable exit operations during export

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

* Move export password logic to service

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

* Reformat

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

* Use explicit null check

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

* Remove unneeded hack

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

* Fixup strings

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

* Don't use coroutines in a service

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

* Update notification icon

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

* Rollback unwanted formatting

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

Co-authored-by: Aditya Wasan <adityawasan55@gmail.com>
2020-07-09 14:00:24 +05:30
Harsh Shandilya
6169920878
global: set an import order rule and reformat with it (#924)
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-07-08 01:25:55 +05:30
Harsh Shandilya
4657185dc6
styles: re-add alertDialogTheme override (#923)
It seems the MaterialComponents inflater does not work with preferences.

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-07-07 19:32:36 +02:00
Fabian Henneke
d192ab2d9a
Work around Chrome Autofill issue (#921) 2020-07-07 20:32:57 +05:30
Harsh Shandilya
5d170249cd
Major UI overhaul and the introduction of a new icon (#920)
Co-authored-by: Fabian Henneke <fabian@henneke.me>
2020-07-07 19:18:24 +05:30
github-actions[bot]
035d3feaa4
Update Public Suffix List data (#917)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-07-04 10:02:13 +05:30
Harsh Shandilya
25b4261574
Migrate to ActivityResultContracts (#910)
* Move git directory selection to ActivityResultContracts

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

* global: replace all android.app.Activity references

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

* res: resolve ObsoleteSdkInt lint warning

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

* layout: silence some overdraw warnings

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

* PasswordFragment: address deprecation

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

* PasswordStore: start addressing deprecation warnings

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

* autofill: silence deprecation warnings for legacy implementation

I don't want to ever touch these files

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

* Reset scrollTarget after use

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

* Refresh password list after each swipe

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

* Convert if to when

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

* Migrate UserPreference to ActivityResultContracts

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

* Also validate result in git directory selection

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

* AutofillSaveActivity: Switch to ActivityResultContracts

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

* AutofillDecryptActivity: Switch to ActivityResultContracts

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

* AutofillFilterActivity: Switch to ActivityResultContracts

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

* Improve deletion flow

- Silently delete empty directory
- Always refresh password list upon completion

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

* Uniform naming for activity result handlers

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

Co-authored-by: Fabian Henneke <FabianHenneke@users.noreply.github.com>
2020-07-03 09:24:06 +02:00
Harsh Shandilya
9fb492b572
Deploy both variants to snapshot directory (#914)
* Deploy both free and non-free variants

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

* build: add product flavor to APK name

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-07-02 20:23:31 +02:00
Fabian Henneke
ca9c951a53
Fill OTP fields with SMS codes (#900)
* Fill OTP fields with SMS codes

* Allow SMS OTP fill also for web origins

* Introduce free and nonFree build variants

* Fix up workflow

* Improve layout and feature detection

* Workflow changes

* Add Changelog entry

* github: update release workflow for nonFree/Free split

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

* Switch to lifecycleScope

* github: make snapshot deploy free variant

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

Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>
2020-07-02 13:49:32 +02:00
Fabian Henneke
c702d4aa9e
Fix up URIish instances with @ in user name (#913) 2020-07-02 16:51:59 +05:30
Fabian Henneke
1c9f7971ce
Scroll to files and enter folders when created (#909) 2020-07-01 21:48:21 +05:30
Fabian Henneke
c5a93b8b81
Run a treewide reformat (#908)
Co-authored-by: Harsh Shandilya <msfjarvis@gmail.com>
2020-07-01 12:51:05 +02:00
Harsh Shandilya
f49d9c35e6
Merge remote-tracking branch 'origin/release' into release-catchup
* origin/release:
  Bump version
  Prepare release 1.9.2
  update changelog
  Workaround to prevent crash on first run (#898)
  build: bump version
  Prepare release 1.9.1
  Backport Actions fixes (#894)
  Remove API 30 from pull request test matrix (#879)
  CHANGELOG: reword to better clarify fixes
  Prevent cached passwords from being wiped (#884)
  Use remembered credential even if it is empty (#880)
  Reset SSH passphrase after SSH key import (#885)
  Add relnotes for #871 (#872)
  Add org.gnu.icecat as a trusted multi-origin browser (#871)

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-07-01 13:08:55 +05:30
Fabian Henneke
eaaa3eeea8
Improve and refactor Autofill heuristics (#905)
* Add support for `AUTOFILL_HINT_NEW_PASSWORD` and
  `AUTOFILL_HINT_NEW_USERNAME`. This allows apps to trigger a
  `ClassifiedScenario` with only a generate password action and is the
  analogue of the W3C new-password hint for websites.
* Do not consider HTML password fields without hints to be certain
  password fields (they could contain e.g. bank account numbers,
  API secrets,...).
* Reduce OTP field false positives by excluding the term "postal" as well
  as fields that match the "code" heuristic term but have HTML maxLength
  less than 6 or larger than 8.
* Add German heuristic term "einmal" ("one-time") for OTP fields
* Also exclude fields based on their HTML name (e.g. for terms such as
  "search").
* Extract fieldId, hint and htmlName matches into an extension property.
* Reduce warnings and remove unnecessary suppression annotations.
2020-07-01 09:22:41 +02:00
Aditya Wasan
82a9a61254
Use PreferenceKeys file to manage SharedPreferences keys. (#891)
* Use PreferenceKeys file to manage SharedPreferences keys.

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

* Use PreferenceKeys in all files

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

* Divide PreferenceKeys into multiple regions

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

* Fix build error

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

* Use PreferenceKeys in more files

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

* Reformat code

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

* Fix build error

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

* Fix merge issues

Signed-off-by: Aditya Wasan <adityawasan55@gmail.com>
2020-07-01 00:00:02 +05:30
Harsh Shandilya
e11ef1ca1d
Revert "Support directly importing secrets" (#904) 2020-06-30 21:28:28 +05:30
Harsh Shandilya
5e74507d5b
Allow importing TOTP configuration through QR codes (#903)
Co-authored-by: Fabian Henneke <fabian@henneke.me>
2020-06-30 19:21:49 +05:30
Harsh Shandilya
1a8e9ec1e4
Bump version
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-06-30 15:14:39 +05:30
Harsh Shandilya
b663fbe64f
Workaround to prevent crash on first run (#898)
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
(cherry picked from commit 57f125a4da)
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-06-30 14:39:22 +05:30
Harsh Shandilya
57f125a4da
Workaround to prevent crash on first run (#898)
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-06-30 14:37:59 +05:30
Fabian Henneke
8bc662c9c0
Offer TOTP Autofill for OTP fields (#899) 2020-06-29 10:12:19 +02:00
Harsh Shandilya
ac6220eed3
Merge SshKeyGenFragment into its activity (#897)
* Merge SshKeyGenFragment into its activity

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

* Drop neutral button discouraged by material specs

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

* Address review comments

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-06-29 12:50:05 +05:30
Harsh Shandilya
063c1a1144
Reintroduce TOTP support (#890)
Co-authored-by: Fabian Henneke <fabian@henneke.me>
2020-06-29 12:08:59 +05:30
Harsh Shandilya
56c301dc7c
Sync with release branch (#896) 2020-06-28 22:36:20 +05:30
Harsh Shandilya
52808fb126
build: bump version
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-06-28 21:34:26 +05:30
Fabian Henneke
535ad1dbb1
Consolidate password list refresh (#887) 2020-06-28 13:29:15 +05:30
Harsh Shandilya
9fc5d337b8
UI fixups (#892) 2020-06-28 01:45:39 +05:30
github-actions[bot]
0a0e517414
Update Public Suffix List data (#888)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-06-27 07:03:29 +02:00
Fabian Henneke
cc2bb76398
Prevent cached passwords from being wiped (#884)
(cherry picked from commit 889208b264)
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-06-26 12:51:30 +05:30
Fabian Henneke
8f7d3052ea
Use remembered credential even if it is empty (#880)
* Use remembered credential even if it is empty

Should fix #875.

* .isNull() --> == null

* Update relnotes

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

* Reword relnotes

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

* 2019 it is

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

Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>
(cherry picked from commit b60c5fb605)
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-06-26 12:44:32 +05:30
Fabian Henneke
b5cff71b93
Reset SSH passphrase after SSH key import (#885)
(cherry picked from commit 6b5984dfe6)
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-06-26 12:44:11 +05:30
Fabian Henneke
b60c5fb605
Use remembered credential even if it is empty (#880)
* Use remembered credential even if it is empty

Should fix #875.

* .isNull() --> == null

* Update relnotes

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

* Reword relnotes

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

* 2019 it is

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

Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>
2020-06-26 09:12:39 +02:00
Fabian Henneke
6b5984dfe6
Reset SSH passphrase after SSH key import (#885) 2020-06-26 09:00:19 +02:00
Fabian Henneke
889208b264
Prevent cached passwords from being wiped (#884) 2020-06-26 08:47:47 +02:00
Harsh Shandilya
2f7c50136a
build: uprev all dependencies (#882)
* build: uprev all dependencies

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

* proguard: add keep rule for WhatTheStack

sigh

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-06-25 14:33:57 +02:00
Fabian Henneke
5c2823405e
Add org.gnu.icecat as a trusted multi-origin browser (#871)
I verified the following:

* Store: F-Droid
* Package hash: wi2iuVvK/WYZUzd2g0Qzn9ef3kAisQURZ8U1WSMTkcM=
* Based on: Firefox
* Actively maintained: https://git.savannah.gnu.org/cgit/gnuzilla.git/log/?h=68
* Multi-origin method: WebView
* Save support: no

(cherry picked from commit 8a90ba46c6)
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-06-25 00:27:31 +05:30
Fabian Henneke
e1f81e8f4b
Use a custom sshj config (#878)
* Use a custom sshj config

* Get random numbers directly from SecureRandom
* Use Timber calls for logging
* Remove all algorithms that are not in the Mozilla Intermediate SSH config

* Address review comments

* Fixup slf4j's custom format string format

Co-authored-by: Harsh Shandilya <msfjarvis@gmail.com>
2020-06-23 15:39:44 +02:00
Fabian Henneke
8a90ba46c6
Add org.gnu.icecat as a trusted multi-origin browser (#871)
I verified the following:

* Store: F-Droid
* Package hash: wi2iuVvK/WYZUzd2g0Qzn9ef3kAisQURZ8U1WSMTkcM=
* Based on: Firefox
* Actively maintained: https://git.savannah.gnu.org/cgit/gnuzilla.git/log/?h=68
* Multi-origin method: WebView
* Save support: no
2020-06-22 11:53:09 +02:00
Harsh Shandilya
3f4e9b4757
build: prepare next development version
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-06-22 02:46:03 +05:30
Harsh Shandilya
693485be8c
build: bump version to 1.9.0
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-06-22 02:45:11 +05:30
Harsh Shandilya
a0b6f48b50 PasswordCreationActivity: properly guard rename code
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-06-21 07:17:34 +02:00
Harsh Shandilya
2c6d4548c5
UserPreference: fix my inability to count (#863) 2020-06-20 12:19:55 +05:30
github-actions[bot]
585d59859d
Update Public Suffix List data (#864)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-06-20 08:03:15 +02:00
Harsh Shandilya
9751cde406
PasswordStore: refresh password list on swipe down in non-git mode (#862)
* PasswordStore: refresh password list on swipe down in non-git mode

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

* Address review comments

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

Co-authored-by: Fabian Henneke <FabianHenneke@users.noreply.github.com>
2020-06-19 00:07:05 +05:30
Diogenes Molinares
0a4bcc57f5
Avoid destination's file outside repository (#861) 2020-06-18 19:49:31 +05:30
Diogenes Molinares
23b488a8eb
Add support for category renaming (#854)
* rename category

* changed CHANGELOG

* IDE Refactor

* Address review comments

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

* change Stack to List and fix bug when empty category name

* create intermediate folders

* little fixes and KDoc added

* Reuse existing move code

* change button Cancel => Skip

* use canonicalPath to confirm destination inside repository

* change error message

* update KDoc

* show different error to user

Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>
Co-authored-by: Harsh Shandilya <msfjarvis@gmail.com>
Co-authored-by: Fabian Henneke <fabian@henneke.me>
Co-authored-by: Fabian Henneke <FabianHenneke@users.noreply.github.com>
2020-06-18 14:07:26 +02:00
Fabian Henneke
33b3f54921
Refactor password generation (#860)
* Refactor password generation

* Update Extensions.kt

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

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

* Address review comments

Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>
2020-06-18 12:04:33 +02:00
Fabian Henneke
e25e0035a2
Update state of encrypt username checkbox onCreate (#859) 2020-06-18 10:23:42 +02:00
Harsh Shandilya
8ff37e953f
Improve bulk deletion and password move flow (#855)
Co-authored-by: Fabian Henneke <FabianHenneke@users.noreply.github.com>
2020-06-17 18:35:46 +05:30
Diogenes Molinares
faff735a08
Properly support password renaming (#852)
Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>
2020-06-14 15:01:43 +05:30
Harsh Shandilya
cd72d15b32
UserPreference: delete all shortcuts when repository is deleted (#850) 2020-06-14 13:24:46 +05:30
Harsh Shandilya
5aab4088d1
Misc UI fixups (#851) 2020-06-14 13:10:33 +05:30
Harsh Shandilya
d8231e112a
Break down PGP Activity into focused sections (#776) 2020-06-12 20:28:15 +05:30
Harsh Shandilya
f3c9733d69
Dependency updates (#844)
* build: uprev dependencies, add leakcanary plumber to patch leaks at runtime

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

* build: upgrade security-crypto

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

* build: fix copypasta fail

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-06-11 11:38:10 +02:00
Fabian Henneke
5d6529a4d8
Replace FileUtils with Kotlin stdlib calls (#843) 2020-06-10 14:49:49 +05:30
Diogenes Molinares
0050deb501
Remove Apache Commons dependencies (#840)
Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>
2020-06-10 14:05:03 +05:30
Fabian Henneke
2fa03e3fa0
Allow custom public suffixes for Autofill (#841)
Adds a preference that allows the user to specify domains that are then
treated as additional public suffixes for the purposes of Autofill.
2020-06-09 13:45:23 +02:00
github-actions[bot]
02b7f5559d
Update Public Suffix List data (#834)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-06-06 10:55:10 +05:30
Harsh Shandilya
448e70704a
AccessibilityAutofill: disable the service above Oreo (#827) 2020-06-05 23:52:02 +05:30
Fabian Henneke
2ab44a4580
Don't show an error if password prompt is cancelled (#833) 2020-06-04 20:01:25 +05:30
Fabian Henneke
4172c70c86
Improve Git password/passphrase dialog behavior (#829)
* Reset PasswordFinder retry state after authentication

* Memorize password inbetween Git commands
2020-06-03 10:08:47 +02:00
Fabian Henneke
0c01a5bbf9
Remove a misguided require from GitOperation (#826) 2020-06-02 16:11:08 +05:30
Fabian Henneke
43ae4bbdb7
Address GitOperationActivity regressions (#824) 2020-06-02 15:03:38 +05:30
Simao Gomes Viana
e922b5260f
app: main: res: add bools.xml with LeakCanary debug build config (#821)
According to https://square.github.io/leakcanary/recipes/#leakcanary-in-release-builds this is necessary. As of now, the latest snapshot build crashes when starting. This is needed to prevent that.
2020-05-31 22:33:32 +05:30
Harsh Shandilya
5a34f444c2
Completely revamp decrypted password screen (#817)
* Completely revamp decrypted password screen

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

* update changelog

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

Co-authored-by: Fabian Henneke <FabianHenneke@users.noreply.github.com>
2020-05-31 10:12:31 +02:00
Harsh Shandilya
523f2afc53
build: Upgrade all dependencies (#803)
* build: upgrade all dependencies

We've accumulated a fat backlog here that's gonna need some heavy testing

* build: adjust for WhatTheStack upgrade

This is now automatically initialized

* build: downgrade security-crypto

* build: upgrade to Gradle 6.4

* idea: sync from AS 4.1.x

* build: bump AGP to 4.0.0

* build: disable Jetifier

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Co-authored-by: Fabian Henneke <FabianHenneke@users.noreply.github.com>
2020-05-31 13:12:15 +05:30
Fabian Henneke
81c4960dd6
Fix GitAsyncTask activity handling in error case (#818) 2020-05-30 21:55:14 +02:00
Fabian Henneke
cd0b23e003
Make commitChange honor finishWithResultOnEnd (#815)
If PasswordRepository.isGitRepo() returns false, commitChange currently
doesn't honor the finishWithResultOnEnd parameter, which causes
Autofill generate flows to hang on a blank AutofillSaveActivity.

This commit lets commitChange mimic what GitAsyncTask does with the
parameter.

Co-authored-by: Harsh Shandilya <msfjarvis@gmail.com>
2020-05-30 21:08:38 +02:00
Fabian Henneke
2428d4c0de
Switch password authentication over to SSHJ (#811)
* Switch password authentication over to SSHJ

* Address review comments and refactor further
2020-05-30 19:39:17 +02:00
Élie Bouttier
72ede314ef
Fix i18n fr (#813) 2020-05-30 22:32:16 +05:30
github-actions[bot]
a8f6669e35
Update Public Suffix List data (#808)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-05-29 10:28:37 +05:30
Harsh Shandilya
e7463ec24c
Remove HOTP/TOTP support (#806) 2020-05-28 22:42:13 +05:30
Harsh Shandilya
ffcbabc2f4
Configure IME options and focus direction (#805) 2020-05-28 16:54:33 +05:30
Fabian Henneke
97911c5877
Use SSHJ for SSH public key authentication (#801) 2020-05-28 09:57:30 +05:30
github-actions[bot]
fea82fed47
Update Public Suffix List data (#804)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-05-28 09:41:00 +05:30
Harsh Shandilya
4084727aad
treewide: update fragments to use LayoutRes constructor (#802)
Third time's the charm

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-05-27 17:53:44 +02:00
Harsh Shandilya
15665244fc
Resolve ViewBinding regressions (#799)
* PasswordStore: remove broken snippet

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

* Cleanup code and remove incorrect onCreateView uses

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

* Fixup imports

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-05-27 12:54:03 +05:30
github-actions[bot]
aeac72286f
Update Public Suffix List data (#798)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-05-27 10:58:57 +05:30
Harsh Shandilya
6ee19f79e7
Introduce and switch to FragmentViewBindingDelegate (#797)
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-05-27 00:14:10 +05:30
Harsh Shandilya
eb936e1f36
Introduce better R8 optimizations (#796) 2020-05-26 21:43:41 +05:30
Fabian Henneke
96ed53206e
Remove "name" from the list of username heuristics (#793) 2020-05-25 17:21:12 +05:30
github-actions[bot]
bf688c28f9
Update Public Suffix List data (#792)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-05-25 08:17:30 +02:00
Harsh Shandilya
0146b5ae94
build: prepare next development revision
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-05-24 16:22:07 +05:30
Harsh Shandilya
ffeb4c17d3
build: bump version
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-05-24 16:21:05 +05:30
Harsh Shandilya
f1befcf7f3
BaseGitActivity: always enforce absolute URLs (#788) 2020-05-24 16:15:07 +05:30
Harsh Shandilya
d034da8d01
Fix tests for #778
And this is why you rebase your PRs before merging :^)

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-05-23 16:00:03 +05:30
Harsh Shandilya
90750b976d
build: prepare next development revision
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-05-23 15:47:45 +05:30
Harsh Shandilya
ffe16e3488
build: bump version
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-05-23 15:47:15 +05:30
Fabian Henneke
a6eb4b4e21
Make connection mode a <= 1 toggle group to prevent UI overflow (#778) 2020-05-23 15:27:52 +05:30
github-actions[bot]
3711bb9aa7
Update Public Suffix List data (#785)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-05-23 11:51:08 +05:30
Harsh Shandilya
d103d6d4ba
Add tests for GitServerConfigActivity (#783)
* Add tests for GitServerConfigActivity

* github: disable animations before running UI tests

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-05-17 01:14:09 +05:30
Harsh Shandilya
7c0d99b8b8
treewide: correct misspellings (#781)
app/src/main/java/com/zeapo/pwdstore/git/CloneOperation.kt:71:31: corrected "occured" to "occurred"
app/src/main/java/com/zeapo/pwdstore/git/PullOperation.kt:45:31: corrected "occured" to "occurred"
app/src/main/java/com/zeapo/pwdstore/git/SyncOperation.kt:60:31: corrected "occured" to "occurred"
app/src/main/java/com/zeapo/pwdstore/git/ResetToRemoteOperation.kt:52:31: corrected "occured" to "occurred"
app/src/main/java/com/zeapo/pwdstore/pwgen/Phonemes.kt:10:22: corrected "DIPTHONG" to "DIPHTHONG"
app/src/main/java/com/zeapo/pwdstore/pwgen/Phonemes.kt:15:31: corrected "DIPTHONG" to "DIPHTHONG"
app/src/main/java/com/zeapo/pwdstore/pwgen/Phonemes.kt:16:31: corrected "DIPTHONG" to "DIPHTHONG"
app/src/main/java/com/zeapo/pwdstore/pwgen/Phonemes.kt:17:31: corrected "DIPTHONG" to "DIPHTHONG"
app/src/main/java/com/zeapo/pwdstore/pwgen/Phonemes.kt:20:35: corrected "DIPTHONG" to "DIPHTHONG"
app/src/main/java/com/zeapo/pwdstore/pwgen/Phonemes.kt:23:31: corrected "DIPTHONG" to "DIPHTHONG"
app/src/main/java/com/zeapo/pwdstore/pwgen/Phonemes.kt:24:31: corrected "DIPTHONG" to "DIPHTHONG"
app/src/main/java/com/zeapo/pwdstore/pwgen/Phonemes.kt:27:35: corrected "DIPTHONG" to "DIPHTHONG"
app/src/main/java/com/zeapo/pwdstore/pwgen/Phonemes.kt:30:31: corrected "DIPTHONG" to "DIPHTHONG"
app/src/main/java/com/zeapo/pwdstore/pwgen/Phonemes.kt:36:35: corrected "DIPTHONG" to "DIPHTHONG"
app/src/main/java/com/zeapo/pwdstore/pwgen/Phonemes.kt:38:31: corrected "DIPTHONG" to "DIPHTHONG"
app/src/main/java/com/zeapo/pwdstore/pwgen/Phonemes.kt:39:31: corrected "DIPTHONG" to "DIPHTHONG"
app/src/main/java/com/zeapo/pwdstore/pwgen/Phonemes.kt:41:35: corrected "DIPTHONG" to "DIPHTHONG"
app/src/main/java/com/zeapo/pwdstore/pwgen/Phonemes.kt:42:35: corrected "DIPTHONG" to "DIPHTHONG"
app/src/main/java/com/zeapo/pwdstore/pwgen/Phonemes.kt:45:35: corrected "DIPTHONG" to "DIPHTHONG"
app/src/main/java/com/zeapo/pwdstore/pwgen/Phonemes.kt:47:35: corrected "DIPTHONG" to "DIPHTHONG"
app/src/main/java/com/zeapo/pwdstore/pwgen/Phonemes.kt:111:54: corrected "Dipthong" to "Diphthong"
app/src/main/java/com/zeapo/pwdstore/pwgen/Phonemes.kt:113:30: corrected "DIPTHONG" to "DIPHTHONG"
app/src/main/java/com/zeapo/pwdstore/pwgen/Phonemes.kt:207:56: corrected "DIPTHONG" to "DIPHTHONG"

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-05-14 14:55:32 +02:00
Fabian Henneke
de4ce44531 Add specific error messages to GitServerConfigActivity 2020-05-14 12:00:30 +02:00
Fabian Henneke
f806438f2c Use absolute paths for custom ports, relative for default port 2020-05-14 12:00:30 +02:00
Fabian Henneke
42981cd52b Improve Git/HTTPS URL generation 2020-05-14 12:00:30 +02:00
Fabian Henneke
698499ba6d
treewide: Reformat XML resources again (#774) 2020-05-14 00:22:49 +05:30
Harsh Shandilya
c0332c42ff
treewide: fix copyright template and apply to all files (#773)
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-05-13 21:01:41 +05:30
Fabian Henneke
d695d21497
Make APS buildable on F-Droid (#762)
* Include lib-publicsuffixlist in tree with proper license attribution

* Exclude lib-publicsuffixlist from code style

* Move applicationId to app/build.gradle

* build: add distributionSha256Sum to Gradle

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

* Initial workflow configuration for PSL update

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

* Initial check-in of PSL data

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

Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>
2020-05-12 11:17:08 +02:00
Harsh Shandilya
b16620b55c
Add setting for fallback username (#772)
* PasswordEntry: remove useless annotations

Turns out VisibleForTesting only applies for documentation purposes. Boo >:(

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

* PasswordEntry: silence locale warning

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

* Add setting for fallback username

Fixes #763

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-05-11 22:13:03 +02:00
Harsh Shandilya
041cf00510
Treewide codestyle cleanup (#765)
- Updated gitignore and checked in the IDE's codestyle config
- Removed spotless as the underlying ktlint backend has failed to resolve the super frustrating import order bug[1] in nearly a year
- Reformat the entire codebase based on the previously committed code style configuration.

1: https://github.com/pinterest/ktlint/issues/527
2020-05-10 19:21:39 +05:30
Harsh Shandilya
94dc92f8d7
Miscellaneous UI tweaking (#771)
* Remove dangling UI element and relayout authentication modes

* Drop unnecessary actionBarPopupTheme declaration

* Improve ssh keygen UI

* Commonize button styling

* Tweak save button in server config

* Tweak generate button in ssh keygen

* Commonize OutlinedButton style

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-05-10 14:25:59 +05:30
Fabian Henneke
9a77f6bbea
Use NoBackgroundTheme for utility activities (#770) 2020-05-09 19:44:24 +02:00
Harsh Shandilya
4c461fb174
Introduce no-auth mode for connections (#768)
Fixes #758
Fixes #526
2020-05-08 20:50:04 +05:30
Harsh Shandilya
ed3312b303
PasswordEntry: add user to the potential candidates for username (#766) 2020-05-06 13:59:48 +05:30
Harsh Shandilya
feab56994d
PasswordEntry: add more potential fields for username (#764) 2020-05-06 01:58:05 +05:30
Harsh Shandilya
69e887f3d8
Better handle non-git repositories (#756) 2020-05-03 01:39:16 +05:30
Harsh Shandilya
ced8bcca01
Confirm password move if it will replace an existing one (#757)
* Confirm password move if it will replace an existing one

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

* CHANGELOG: update

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-05-01 16:32:58 +05:30
Fabian Henneke
c41100eff9
Use official FastScroll fix and refactor PasswordFragment (#753) 2020-04-29 08:53:27 +02:00
Harsh Shandilya
edc6dcda88
build: update to openpgp-ktx 2.0 (#749)
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-04-29 11:01:22 +05:30
Harsh Shandilya
27cc0728d4
build: prepare next release
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-04-29 03:15:05 +05:30
Harsh Shandilya
1e67936751
build: bump version
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-04-29 03:12:29 +05:30
Fabian Henneke
d1abc09ef7
Fix Autofill icons in dark mode (#748) 2020-04-28 13:30:22 +05:30
Harsh Shandilya
8cada17bcb
Add toggle for debug logging (#745) 2020-04-25 20:34:33 +05:30
Harsh Shandilya
f89d5c282f
Improve UX around settings items (#744)
Fixes #461
2020-04-25 16:53:40 +05:30
Maxime Catrice
f7dbac4649
Fix search if external root dir starts with a dot (#743)
Fixes #740
Co-Authored-By: Fabian Henneke <FabianHenneke@users.noreply.github.com>
2020-04-25 15:18:19 +05:30
Harsh Shandilya
73695e2493
auth: redo implementation with a cleaner and simpler API surface (#741) 2020-04-24 15:00:33 +05:30
Harsh Shandilya
bee20ac44a
Better detect uninitialized repositories and offer to clone (#738)
* PasswordRepository: more comprehensive check for valid repository

* PasswordFragment: Give 'repo uninitialized' Snackbar some purpose in life

* GitOperationActivity: finish immediately when an unhandled request code is used

* PasswordFragment: Make uninitialized repo Snackbar indefinite

* spotless

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-04-24 02:05:07 +05:30
Harsh Shandilya
b3f6fc20c4
build: prepare next development version
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-04-23 12:54:09 +05:30
Harsh Shandilya
9a843b08f3
build: bump version for patch release
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-04-23 12:52:24 +05:30
Harsh Shandilya
3d8cea5966
Improve permission handling logic (#732)
* Improve permission handling logic

Ensure we always ask for storage permissions when required

* Refactor storage permission checks and invert return value

* PasswordStore: improve permission grant flow

* strings: slightly reword permission grant request message

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

Co-authored-by: Fabian Henneke <fabian@henneke.me>
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-04-22 21:57:52 +05:30
Fabian Henneke
00361a58c7
Fix crash when using type independent sort (#734) 2020-04-22 18:13:56 +02:00
Fabian Henneke
9c1cc8690d
Mark Autofill onboarding dialog as seen on dismiss (#731) 2020-04-22 14:44:25 +05:30
Fabian Henneke
c302d6fe58
Never obscure OK button in Autofill onboarding UI (#729) 2020-04-21 21:38:02 +02:00
Harsh Shandilya
0c0649b86d
build: prepare next development version
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-04-21 18:39:02 +05:30
Harsh Shandilya
ec0d478b85
build: bump version to 1.7.0
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-04-21 18:39:01 +05:30
Harsh Shandilya
3d0850fa1f
build: inline versionCode and versionName at destination
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-04-21 18:39:01 +05:30
Harsh Shandilya
e6ea5f6a08
PasswordStore: onboard users to Oreo autofill
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-04-21 18:39:00 +05:30
Harsh Shandilya
b0774febb1
Application: only install logging tree in debug features build
We should be at a stability level now that does not require logging in prod

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-04-21 15:55:26 +05:30
Harsh Shandilya
500ab60973
treewide: switch to logging via timberkt
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-04-21 15:55:26 +05:30
Harsh Shandilya
72166c6912
treewide: use getSystemService extension everywhere
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-04-21 15:55:25 +05:30
Harsh Shandilya
d505151662
treewide: use edit extension and cleanup some deprecation
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-04-21 15:55:25 +05:30
Harsh Shandilya
e1921b26e0
Remove unused import
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-04-21 15:55:25 +05:30
Harsh Shandilya
77096c1702
BaseGitActivity: don't remove saved password unnecessarily
if previousUrl is empty it means that this the first time the method is being called, and url
has not been built yet. We let things slide for the first pass so that the actual logic
only kicks in when it needs to.

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-04-21 15:36:30 +05:30
Harsh Shandilya
47c2875e93
Fix protocol validation (#726)
* GitOperation: code cleanup

* WIP: Fix validation

* Fixup SSH validation

* Spotless

* Remove logging of MalformedURLException

Co-authored-by: Fabian Henneke <fabian@henneke.me>
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-04-20 13:29:10 +05:30
Harsh Shandilya
99aa0d9bb2
Validate hostname protocol before saving (#723)
* RFC: protocol validation

* Use java.net.URL for saner parsing

* Improve protocol correction; handle ssh://

Co-authored-by: Fabian Henneke <fabian@henneke.me>
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-04-19 17:13:39 +05:30
Harsh Shandilya
aaeb899fb6
PgpActivity: hide category view when there's no text
Co-Authored-By: Fabian Henneke <fabian@henneke.me>
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-04-19 14:11:19 +05:30
Harsh Shandilya
17385892cb
PasswordFragment: Replace fab options with descriptive bottom sheet
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-04-19 14:11:19 +05:30
Harsh Shandilya
eb5a30c3a9
PasswordFragment: animate FAB in action mode
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-04-19 14:11:18 +05:30
Fabian Henneke
e5d178ea3c
Work around incompatibility between AndroidFastScroll and recyclerview-selection (#721)
* Work around incompatibility between AndroidFastScroll and recyclerview-selection

* move hacked recyclerview into separate package

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

* Make RecyclerViewHelper private static

Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>
2020-04-19 10:40:49 +02:00
Harsh Shandilya
934c256edd
Resolve lint warnings
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-04-18 23:52:16 +05:30
Harsh Shandilya
5d884a8a74
SshKeygenTask: fix build error
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-04-18 23:52:15 +05:30
Harsh Shandilya
beaec159e8
Update SSH clear passphrase preference to handle HTTPS (#716)
* Update SSH clear passphrase preference to handle HTTPS

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

* Address review comments

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

* Address review comments

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

* Explicitly set preference to visible if it can do anything

* Address review comments

Co-authored-by: Fabian Henneke <FabianHenneke@users.noreply.github.com>
Co-authored-by: Fabian Henneke <fabian@henneke.me>
2020-04-17 20:12:48 +02:00
Harsh Shandilya
0e1dd641d2
AutofillDecryptActivity: Show toast on Main dispatcher (#717)
Without this the activity will crash rather than display the error

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-04-17 23:04:18 +05:30
Harsh Shandilya
b94b52a42d
Refactor Git related activities (#685)
* Refactor git logic into separate parts

* Extract hardcoded strings

* Add KDoc to updateHostname, remove unused field

* Cleanups

* Fix dialog message

* Wire in repository clone flow

* spotless

* Remove unused method

* Cleanup GitActivity

- Rename to GitOperationActivity.
- Ensure identityBuilder is always closed regardless of what fragment uses it.
- Remove hardcoded "Operation" strings and replace with REQUEST_ARG_OP.
- Apply a transparent theme to GitOperationActivity make the UI less jarring.

* Tweak some stupidly worded dialog messages

As pointed out in #629, these strings are shoddily worded and do not express any clear intent to the
user, leaving them confused and angry.

* GitOperationActivity: wrap Context to ensure right theme is used

* spotless

* undo build.gradle change

* Use correct parent theme, remove now useless wrapping

* GitServerConfigActivity: fix repository clone flow

* temp: disable leakcanary

framework leaks on Samsung are pissing me off

* Make system bars transparent in git activity

* Tweak HTTPS password layout

* Unhardcode wrong passphrase string

* Store SSH passphrase in EncryptedSharedPreferences

Also revamp the dialog to look a bit better

* Implement support for remembering HTTPS password

Fixes #521

* Try to patch HTTPS remote creation logic

* Update security-crypto

* Clear saved passphrase/password on auth failure

* Revert "Update security-crypto"

Broken on R DP2.1

This reverts commit 4b20371dd42c512a3dd3b759859abb6c1ffd2961.

* Revert "temp: disable leakcanary"

This reverts commit 2db7d41bd67b79c6dc8c5b359a7b27100379f45f.

* Update CHANGELOG

* Remove spacer

* Remove useless override

* Wrap git server activity in a ScrollView

* GitOperation: always finish calling activity when dialogs are dismissed

* Wipe saved password/passphrase when hostname changes

* Don't commit prefs updates

* Don't call listFiles excessively

* Finish activity after saving configuration

* Make ConnectionMode and Protocol enum classes

* Change SSH key passphrase key, don't wipe on host change

* Reimplement BaseGitActivity.updateUrl (was updateHostname)

* Use SharedPreferences.edit KTX extension

* Disable inapplicable connection modes depending on scheme

* BaseGitActivity: annotate onDestroy with CallSuper

We'll leak the identityBuilder connection otherwise

* Move input hack for AlertDialog into an extension function

We re-use this in many places

* Fix protocol/mode toggle issue and consistenly name options

* Fix a crash when opening GitServerConfigActivity without a repo

* Fix OpenKeychain callbacks by moving onActivityResult to BaseGitActivity

* Run spotlessApply

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Co-authored-by: Fabian Henneke <fabian@henneke.me>
2020-04-17 18:36:07 +05:30
Harsh Shandilya
4ffd7ed9bf
Enable emulator tests (#708)
* github: Enable instrumentation testing in PRs

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

* Upgrade to Gradle 6.3

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

* Remove outdated and broken tests, redo PasswordEntryTest in Kotlin

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

* Remove now unused test assets

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

* github: Disable debug APK uploads in PR testing

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

* Update .github/workflows/pull_request.yml

* Update .github/workflows/pull_request.yml

Switching to Ubuntu fails due to the SDK 29 missing.

Co-authored-by: Fabian Henneke <FabianHenneke@users.noreply.github.com>
2020-04-17 00:24:13 +05:30
Fabian Henneke
8b4751f825
Improve SSH private key validation (#713)
* Improve SSH private key validation

* Address review comment
2020-04-16 18:34:55 +05:30
Diogenes Molinares
f269bc7d28
See file's metadata to validate SSH key (#709)
* See file's metadata to validate SSH key

* See file's metadata to validate SSH key

* change exception to throw and refactoring

* catch IOException and IllegalArgumentException as equal

* run ./gradlew spotlessApply

* Apply suggestions from code review

* validate BEGIN, END markers and size != 0

* Apply suggestions from code review

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

* Don't throw on SSH key import failure

* Style nits

* Codestyle and copy nits

Co-authored-by: Fabian Henneke <fabian@henneke.me>
Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>
2020-04-16 17:21:24 +05:30
Fabian Henneke
e4aa673537
Reduce build warnings (#712)
* Add annotations to and reformat SearchableRepositoryViewModel.kt

* Address build warnings other than meaningful deprecations

* Deal with warnings in UserPreference.kt
2020-04-16 12:20:45 +02:00
Fabian Henneke
2a6326ec0e Address review comments 2020-04-15 22:47:41 +05:30
Fabian Henneke
7cd6f1d1cf Add a switch between Fuzzy and StrictDomain mode to Autofill search view 2020-04-15 22:47:41 +05:30
Fabian Henneke
441b4d3b68 Add support for "work/example.org.gpg" folder layout 2020-04-15 22:47:41 +05:30
Fabian Henneke
5a3220527f Respect encrypted username when filling Autofill generated entry 2020-04-15 22:47:41 +05:30
Fabian Henneke
d6db10e089 Match any path component in StrictDomain FilterMode 2020-04-15 22:47:41 +05:30
Fabian Henneke
b633cc1f3d Make existing tests buildable again 2020-04-15 22:47:41 +05:30
Fabian Henneke
db2743289d
Fix crash on Autofill save introduced by #699 (#706) 2020-04-15 21:13:31 +05:30
Fabian Henneke
75a70543b3
Improve search logic and UI (#703)
* Don't list the current directory in search results

* Scroll to top result when search term is changed

* Match relative path in StrictDomain filter mode

* Improve and document DirectoryStructure null handling

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-04-15 00:57:51 +05:30
Fabian Henneke
ec8bcae8fa
Improve Autofill enable UI and flaky browser list (#704) 2020-04-14 11:43:57 +02:00
Fabian Henneke
ef0cc9f047
Always refresh password list when navigating back (#701) 2020-04-14 14:05:06 +05:30
Fabian Henneke
b82303d5dd
Don't trigger onMenuItemActionCollapse on navigation (#702) 2020-04-14 13:09:52 +05:30
Fabian Henneke
0d54a687d6
Fix repository corruption by AutofillSaveActivity (#699) 2020-04-14 03:51:59 +05:30
Fabian Henneke
11c7e36986
Raise targetSdk to 29 (#682)
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-04-13 00:40:40 +05:30
Harsh Shandilya
4f20c49abb
Request WRITE_EXTERNAL_STORAGE for external password repository (#698)
* PasswordStore: request WRITE_EXTERNAL_STORAGE permission instead

We wish to be able to write to our password store directory as well.

Fixes #697
Fixes #365

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

* Reword changelog entry

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-04-13 00:31:25 +05:30
Harsh Shandilya
f21b6426af
Switch refactored entities to ViewBinding (#695)
* build: Enable ViewBinding

* autofill: oreo: Switch to ViewBinding

* PasswordFragment: switch to ViewBinding

* AutofillPublisherChangedActivity: use with(binding) { } syntax

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-04-11 01:07:49 +05:30
Fabian Henneke
575ef84726
Modernize legacy RecyclerView adapters (#694)
* Modernize legacy RecyclerView adapters

Introduces new adapters based on the SearchableRepositoryViewModel and
using androidx.recyclerview.selection for multiselection support.

The following positive effects in behavior are observable to end-users:

- Search and navigation actions are executed on IO threads.
- RecyclerViews are now animated during searches (but not navigations).
- Exact scroll position is restored when navigating back.
- The ActionBar title is updated with the current folder name.

The following negative effects may warrant attention:

- Support for the "always search from root" setting has been removed.
- Due to a limitation of the fast scroll dependency, using the scroller
  may result in unwanted multiselections. If this is not fixed in the
  library, native fast scroller capabilities could be used, but these
  are more limited in appearance and to not offer popups.

* Fix lint

* Fix FastScroller/SelectionTracker incompatibility

* Immediately react to settings changes

* List directory entries when search term is blank

* Use isEmpty() instead of == ""

* Replace adapter inheritance with builders and fix selection drags

* Remove dividers in password lists

* Run spotlessApply

* Use a more logical string in action mode

* Commonize and constify path bundle key

* Make lambda parameter name explicit

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>
2020-04-10 16:48:42 +05:30
Fabian Henneke
2738d7500f
Remove an erroneous check on directory moves (#693) 2020-04-08 18:25:44 +05:30
Hussein Al Abry
ab034a8ba3
pull translations from transifex (#691)
russian translation at 99%
2020-04-07 21:11:49 +00:00
Fabian Henneke
e3a49e2632
Modernize file listing and search in AutofillFilterActivity (#683)
* WIP: Modernize file listing and search

* Refactor

* Implement fuzzy search

* Improve ViewModel API and introduce Adapter

* Integrate new search into AutofillFilterActivity and dedebounce

* Improve no results layout

* Reformat

* Highlight origin in FileBased directory structure

* Extract highlighting logic into DirectoryStructure

* Trim whitespace before searching

* Remove debug logging

* Remove more debug logging

* Organize imports

* Remove imports

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

Co-Authored-By: Harsh Shandilya <me@msfjarvis.dev>

* Address review comments

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-04-07 02:26:52 +05:30
Fabian Henneke
034babcbf4
Fix AutofillFilterActivity icons in dark mode (#689) 2020-04-06 17:06:02 +05:30
Fabian Henneke
6a54404462
Fix: Make path editable when generating a password (#688) 2020-04-06 08:02:06 +02:00
Fabian Henneke
4e8f5e0f69
Fix: Make generated entry path editable without suggested username (#687)
The path of a new entry created via Autofill should always be editable, even when no username is prefilled (e.g., when generating a new password or saving a form with no detected username field).
2020-04-05 20:34:40 +05:30
Harsh Shandilya
bc463f3c64
Significantly improve app theming (#679)
* Update CHANGELOG

* Use outlined box style in folder creation dialog

* Add user-facing choice for app theme

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-03-29 20:03:50 +05:30
Fabian Henneke
6e84ca1f3c
Fix PgpActivity crash on orientation change (#681)
Currently, PgpActivity resets or crashes when the orientation (or
screen size) changes.

Since we do not use separate resources in landscape mode, the easiest
and only slightly hacky solution is to tell the system to not recreate
the activity in response to these changes.
2020-03-29 18:46:42 +05:30
Harsh Shandilya
f228dc4a98
Don't inflate menu multiple times (#678)
Otherwise you get this insanity https://i.imgur.com/N918NFG.png

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-03-29 15:19:44 +05:30
Fabian Henneke
6aed471f31
Workaround and potential fix for search issues (#677) 2020-03-29 13:05:54 +05:30
Fabian Henneke
29427a061b
Add "alias" to the username heuristic terms (#676) 2020-03-28 20:30:18 +05:30
Fabian Henneke
453cf58b38
Let IME button dismiss keyboard during search (#673)
The IME search button is currently without function while the
PasswordStore SearchView is focused, which means that the keyboard
hides part of the search result until back is pressed.

This commit makes the IME button function like the back key in this
situation, dismissing the keyboard.

Co-authored-by: Harsh Shandilya <msfjarvis@gmail.com>
2020-03-27 10:06:16 +01:00
Fabian Henneke
94b0b64501
Fix: Restore store scroll position on back press (#670)
Restoring the scroll position in the main store fragment is currently
broken since the stored state (recyclerView.verticalScrollbarPosition)
is always 0 - it is just an enum that governs where the scrollbar is
placed on the screen.

The fix is to remember the list position of the last fully visible item
and scroll to it when restoring the scroll position.

Co-authored-by: Harsh Shandilya <msfjarvis@gmail.com>
2020-03-27 10:02:31 +01:00
Fabian Henneke
791868f3d6
Fix: Set childCount correctly on recycled rows (#675)
The childCount is not set explicitly for empty directories, which means
that the childCount of the entry from which the current row was
recycled is preserved. This results in empty directories being shown
with seemingly random child counts.

The fix is to always set text and visibility for the childCount view.

Co-authored-by: Harsh Shandilya <msfjarvis@gmail.com>
2020-03-27 09:58:41 +01:00
Fabian Henneke
0153d3215e
Un-hack focus gain in folder creation dialog (#672)
The current way to let the folder name EditText in the folder creation
dialog gain focus is... slightly hacky.

This commit proposes a more conceptual solution, which, if it works
reliably, could be much easier to maintain.
2020-03-27 09:53:49 +01:00
Fabian Henneke
b21c032f31
Improve Autofill heuristic terms (#674)
Add "e-mail" and "login" as username terms and sort the lists.

Co-authored-by: Harsh Shandilya <msfjarvis@gmail.com>
2020-03-27 13:38:29 +05:30
Fabian Henneke
b6730ac123
Make folder creation dialog cancelable (#671) 2020-03-27 13:27:22 +05:30
Fabian Henneke
57771c4dfe
Fix: Commit file after Autofill generate/save (#669)
Currently, password files generated via the Autofill generate or save
flow are not committed to the Git repository and therefore also not
synchronized to the remote.

The root cause is that it was missed that PgpActivity relies on
PasswordStore to commit the changes when it returns an appropriate
result code.

The fix is to extract the commit code into the companion object of
PasswordStore and call it from AutofillSaveActivity's onActivityResult.
2020-03-26 19:49:28 +01:00
Fabian Henneke
de4cc63860
Fix deletion of individual password files (#668)
Commit fde8137b (#659) introduced a regression that results in Password Store crashing when the user tries to delete a single password file as opposed to a directory.

The root cause is a call of FileUtils.listFiles() on the selected item, which only works for directories.

The fix is to work with a list consisting only of the selected item if it happens to be a file.
2020-03-26 19:08:01 +01:00
Fabian Henneke
a736dcc255
Fix: Don't apply single-origin mode to native apps (#667)
An unwarranted use of the Elivs operator in Form.kt makes it such that
the restrictions of single-origin mode also apply to native apps.

This commit fixes the bug and also reduces the number of intermediate
values that can mask mistakes like this one.

It also renames saveFlag to saveFlags in BrowserAutofillSupportInfo
since this variable is not limited to contain only a single flag.
2020-03-26 20:59:19 +05:30
Fabian Henneke
5445899ab8
Workaround: Prevent fill-in datasets from being shown on Android… (#666) 2020-03-26 14:33:54 +05:30
Fabian Henneke
8f722a2219
Fix: Properly handle IP addresses and invalid domains in Autofill (#664)
Mozilla's getPublicSuffixPlusOne is only meant to be invoked on syntactically
valid domain names. In particular, it does not give reasonable results for IP
addresses.

This commit ensures that the domain passed to getPublicSuffixPlusOne is
syntactically valid and not an IP address (the latter is unfortunately
considered a domain by the Android validation patterns).
2020-03-25 20:21:56 +01:00
Fabian Henneke
fde16c60f4
Make preferred directory structure for Autofill configurable (#660)
Some users keep their password files in a directory structure such as:
/example.org/john@doe.org.gpg
while others prefer the style:
/example.org/john@doe.org/password.gpg

This commit adds a setting that allows to switch between the two. All Autofill
operations, such as search, match, generate and save, respect this setting.

Note: The first style seems to be the most widely used and is therefore kept as
the default. The second style is mentioned on the official Pass website at:
https://www.passwordstore.org/#organization
2020-03-25 18:13:04 +01:00