Let the PasswordFinderCredentialsProvider support Username as a
CredentialItem type and return the user part of the repository URI when
it is requested.
(cherry picked from commit 679037b81d)
* 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>
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.
* - 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>
* 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>
* 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>
* 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>
* 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
min and max were deprecated in favor of minOrNull and maxOrNull respectively to match their names to the typical
naming format used by stdlib methods with nullable return types
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
SMS OTP Autofill currently crashes for two reasons:
1. Tasks.await has a precondition of not running on the UI thread.
2. Exceptions thrown from Tasks are always wrapped into
ExecutionExceptions and need to be unwrapped before they can be
identified as ResolvableApiException.
This commit addresses both issues by making waitForSms a proper
coroutine using withContext and a custom wrapper around Task<T> that
relies on suspendCoroutine and automatically unwraps exceptions.
(cherry picked from commit 3afeff45d8)
SMS OTP Autofill currently crashes for two reasons:
1. Tasks.await has a precondition of not running on the UI thread.
2. Exceptions thrown from Tasks are always wrapped into
ExecutionExceptions and need to be unwrapped before they can be
identified as ResolvableApiException.
This commit addresses both issues by making waitForSms a proper
coroutine using withContext and a custom wrapper around Task<T> that
relies on suspendCoroutine and automatically unwraps exceptions.