From 5c2823405e5d050fe681fa753c0e9137306a5ff8 Mon Sep 17 00:00:00 2001 From: Fabian Henneke Date: Mon, 22 Jun 2020 11:53:09 +0200 Subject: 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 8a90ba46c63501b57e95da7ef016dcbb749b7928) Signed-off-by: Harsh Shandilya --- .../java/com/zeapo/pwdstore/autofill/oreo/FeatureAndTrustDetection.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/java/com/zeapo/pwdstore/autofill/oreo/FeatureAndTrustDetection.kt b/app/src/main/java/com/zeapo/pwdstore/autofill/oreo/FeatureAndTrustDetection.kt index be6263de..8864f877 100644 --- a/app/src/main/java/com/zeapo/pwdstore/autofill/oreo/FeatureAndTrustDetection.kt +++ b/app/src/main/java/com/zeapo/pwdstore/autofill/oreo/FeatureAndTrustDetection.kt @@ -65,6 +65,7 @@ private val TRUSTED_BROWSER_CERTIFICATE_HASH = mapOf( "com.opera.mini.native" to "V6y8Ul8bLr0ZGWzW8BQ5fMkQ/RiEHgroUP68Ph5ZP/I=", "com.opera.mini.native.beta" to "V6y8Ul8bLr0ZGWzW8BQ5fMkQ/RiEHgroUP68Ph5ZP/I=", "com.opera.touch" to "qtjiBNJNF3k0yc0MY8xqo4779CxKaVcJfiIQ9X+qZ6o=", + "org.gnu.icecat" to "wi2iuVvK/WYZUzd2g0Qzn9ef3kAisQURZ8U1WSMTkcM=", "org.mozilla.fenix" to "UAR3kIjn+YjVvFzF+HmP6/T4zQhKGypG79TI7krq8hE=", "org.mozilla.fenix.nightly" to "d+rEzu02r++6dheZMd1MwZWrDNVLrzVdIV57vdKOQCo=", "org.mozilla.fennec_aurora" to "vASIg40G9Mpr8yOG2qsN2OvPPncweHRZ9i+zzRShuqo=", @@ -102,6 +103,7 @@ private val BROWSER_MULTI_ORIGIN_METHOD = mapOf( "com.opera.mini.native" to BrowserMultiOriginMethod.WebView, "com.opera.mini.native.beta" to BrowserMultiOriginMethod.WebView, "com.opera.touch" to BrowserMultiOriginMethod.WebView, + "org.gnu.icecat" to BrowserMultiOriginMethod.WebView, "org.mozilla.fenix" to BrowserMultiOriginMethod.Field, "org.mozilla.fenix.nightly" to BrowserMultiOriginMethod.Field, "org.mozilla.fennec_aurora" to BrowserMultiOriginMethod.Field, -- cgit v1.2.3 From 694e461f6c295916c84de836f9ae28307e515f54 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Thu, 25 Jun 2020 00:28:07 +0530 Subject: Add relnotes for #871 (#872) (cherry picked from commit d5310bdd8e7d09d49fc35b32d3ef0de2e5737198) Signed-off-by: Harsh Shandilya --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e9500bf..2247f45e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. ## [Unreleased] +### Added + +- Add GNU IceCatMobile to the list of supported browsers for Autofill + ## [1.9.0] - 2020-06-21 ### Fixed -- cgit v1.2.3 From b5cff71b939bc13bdfbb031fb7ab6aba33598955 Mon Sep 17 00:00:00 2001 From: Fabian Henneke Date: Fri, 26 Jun 2020 09:00:19 +0200 Subject: Reset SSH passphrase after SSH key import (#885) (cherry picked from commit 6b5984dfe65a538a9b96878dff66aea4743a5f79) Signed-off-by: Harsh Shandilya --- app/src/main/java/com/zeapo/pwdstore/UserPreference.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/java/com/zeapo/pwdstore/UserPreference.kt b/app/src/main/java/com/zeapo/pwdstore/UserPreference.kt index 0ed1a66a..fb27ba6a 100644 --- a/app/src/main/java/com/zeapo/pwdstore/UserPreference.kt +++ b/app/src/main/java/com/zeapo/pwdstore/UserPreference.kt @@ -655,6 +655,7 @@ class UserPreference : AppCompatActivity() { val prefs = PreferenceManager.getDefaultSharedPreferences(applicationContext) prefs.edit { putBoolean("use_generated_key", false) } + getEncryptedPrefs("git_operation").edit { remove("ssh_key_local_passphrase") } // Delete the public key from generation File("""$filesDir/.ssh_key.pub""").delete() -- cgit v1.2.3 From 8f7d3052ea0814ee701b3aefb13b7be386a21c39 Mon Sep 17 00:00:00 2001 From: Fabian Henneke Date: Fri, 26 Jun 2020 09:12:39 +0200 Subject: 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 * Reword relnotes Signed-off-by: Harsh Shandilya * 2019 it is Signed-off-by: Harsh Shandilya Co-authored-by: Harsh Shandilya (cherry picked from commit b60c5fb605893be51840b742bf3e3c89c5b446a5) Signed-off-by: Harsh Shandilya --- CHANGELOG.md | 4 ++++ app/src/main/java/com/zeapo/pwdstore/git/GitOperation.kt | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2247f45e..77b7def1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. ## [Unreleased] +### Fixed + +- Remember passphrase option did not work with keys that had empty passphrases and were generated before 2019 + ### Added - Add GNU IceCatMobile to the list of supported browsers for Autofill diff --git a/app/src/main/java/com/zeapo/pwdstore/git/GitOperation.kt b/app/src/main/java/com/zeapo/pwdstore/git/GitOperation.kt index 6df5f65d..8cf09b39 100644 --- a/app/src/main/java/com/zeapo/pwdstore/git/GitOperation.kt +++ b/app/src/main/java/com/zeapo/pwdstore/git/GitOperation.kt @@ -67,7 +67,7 @@ private class GitOperationCredentialFinder(val callingActivity: Activity, val co val storedCredential = gitOperationPrefs.getString(credentialPref, null) if (isRetry) gitOperationPrefs.edit { remove(credentialPref) } - if (storedCredential.isNullOrEmpty()) { + if (storedCredential == null) { val layoutInflater = LayoutInflater.from(callingActivity) @SuppressLint("InflateParams") -- cgit v1.2.3 From cc2bb763980a15cf32fa068adcccbb6e3b8f2b1b Mon Sep 17 00:00:00 2001 From: Fabian Henneke Date: Fri, 26 Jun 2020 08:47:47 +0200 Subject: Prevent cached passwords from being wiped (#884) (cherry picked from commit 889208b2644fd5676de8e05b81b4712dd11fa58b) Signed-off-by: Harsh Shandilya --- .../zeapo/pwdstore/git/config/SshjSessionFactory.kt | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/com/zeapo/pwdstore/git/config/SshjSessionFactory.kt b/app/src/main/java/com/zeapo/pwdstore/git/config/SshjSessionFactory.kt index f643c714..f900e959 100644 --- a/app/src/main/java/com/zeapo/pwdstore/git/config/SshjSessionFactory.kt +++ b/app/src/main/java/com/zeapo/pwdstore/git/config/SshjSessionFactory.kt @@ -38,13 +38,13 @@ import kotlin.coroutines.suspendCoroutine sealed class SshAuthData { class Password(val passwordFinder: InteractivePasswordFinder) : SshAuthData() { override fun clearCredentials() { - passwordFinder.clearPassword() + passwordFinder.clearPasswords() } } class PublicKeyFile(val keyFile: File, val passphraseFinder: InteractivePasswordFinder) : SshAuthData() { override fun clearCredentials() { - passphraseFinder.clearPassword() + passphraseFinder.clearPasswords() } } @@ -57,13 +57,14 @@ abstract class InteractivePasswordFinder : PasswordFinder { private var isRetry = false private var lastPassword: CharArray? = null + private val rememberToWipe: MutableList = mutableListOf() fun resetForReuse() { isRetry = false } - fun clearPassword() { - lastPassword?.clear() + fun clearPasswords() { + rememberToWipe.forEach { it.clear() } lastPassword = null } @@ -73,17 +74,20 @@ abstract class InteractivePasswordFinder : PasswordFinder { // now being reused for a new one. We try the previous password so that the user // does not have to type it again. isRetry = true - return lastPassword!! + return lastPassword!!.clone().also { rememberToWipe.add(it) } } - clearPassword() + clearPasswords() val password = runBlocking(Dispatchers.Main) { suspendCoroutine { cont -> askForPassword(cont, isRetry) } } isRetry = true - return password?.toCharArray()?.also { lastPassword = it } - ?: throw SSHException(DisconnectReason.AUTH_CANCELLED_BY_USER) + if (password == null) + throw SSHException(DisconnectReason.AUTH_CANCELLED_BY_USER) + val passwordChars = password.toCharArray().also { rememberToWipe.add(it) } + lastPassword = passwordChars + return passwordChars.clone().also { rememberToWipe.add(it) } } final override fun shouldRetry(resource: Resource<*>?) = true -- cgit v1.2.3 From e21c8cd0fcad155529fca7aeaee1f24ecf758502 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Fri, 26 Jun 2020 12:52:33 +0530 Subject: CHANGELOG: reword to better clarify fixes Signed-off-by: Harsh Shandilya --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 77b7def1..49ccec15 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ All notable changes to this project will be documented in this file. ### Fixed -- Remember passphrase option did not work with keys that had empty passphrases and were generated before 2019 +- Remember passphrase option did not work with old-style keys (generated either before 2019 or by passing `-m PEM` to new versions of OpenSSH) ### Added -- cgit v1.2.3 From 9d76eec76eaef6f59c65e081f880d8128e644921 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Tue, 23 Jun 2020 18:51:47 +0530 Subject: Remove API 30 from pull request test matrix (#879) * Revert "github: run instrumentation tests against API 30 (#847)" API 30 is too flaky to be a part of our active test suite. This reverts commit bf33fb2c88a208931340201e95a524b274d70b31. * github: bump android-emulator-runner action Signed-off-by: Harsh Shandilya (cherry picked from commit eb31385102f38ed3c378b210650d4c8dd1785ff8) Signed-off-by: Harsh Shandilya --- .github/workflows/pull_request.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index e6d49b6e..ccd77e8b 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -6,7 +6,7 @@ jobs: runs-on: macos-latest strategy: matrix: - api-level: [23, 29, 30] + api-level: [23, 29] variant: [Debug, Release] steps: @@ -71,10 +71,10 @@ jobs: - name: Run instrumentation tests if: ${{ steps.service-changed.outputs.result == 'true' }} - uses: reactivecircus/android-emulator-runner@v2.10.0 + uses: reactivecircus/android-emulator-runner@v2.11.0 with: api-level: ${{ matrix.api-level }} - target: google_apis + target: default script: | adb shell settings put global animator_duration_scale 0 adb shell settings put global transition_animation_scale 0 -- cgit v1.2.3 From 23f7594db4b5d341637b9dc3e726fab67788c451 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Sun, 28 Jun 2020 21:32:27 +0530 Subject: Backport Actions fixes (#894) --- .github/workflows/branch_deploy.yml | 72 --------------------------------- .github/workflows/deploy_snapshot.yml | 2 +- .github/workflows/draft_new_release.yml | 10 +++-- 3 files changed, 7 insertions(+), 77 deletions(-) delete mode 100644 .github/workflows/branch_deploy.yml diff --git a/.github/workflows/branch_deploy.yml b/.github/workflows/branch_deploy.yml deleted file mode 100644 index 46f84ce0..00000000 --- a/.github/workflows/branch_deploy.yml +++ /dev/null @@ -1,72 +0,0 @@ -on: - push: - branches-ignore: - - master - paths: - - '.github/**' - - 'app/**' - - 'gradle/**' - - '*.properties' - - '*.gradle' - - 'gradlew' - - 'gradlew.bat' - -name: Build debug -jobs: - generate-debug-build: - runs-on: ubuntu-latest - if: "!contains(github.event.head_commit.message, '[ci skip]')" - steps: - - name: Checkout repository - uses: actions/checkout@v1 - - - name: Decrypt secrets - run: release/signing-setup.sh "$ENCRYPT_KEY" - env: - ENCRYPT_KEY: ${{ secrets.ENCRYPT_KEY }} - - - name: Copy CI gradle.properties - run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties - - - name: Generate cache key - run: ./.github/checksum.sh checksum.txt - - - name: Cache gradle modules - uses: actions/cache@v1 - with: - path: ~/.gradle/caches/modules-2 - key: ${{ runner.os }}-gradlemodules-${{ hashFiles('checksum.txt') }} - restore-keys: | - ${{ runner.os }}-gradlemodules- - - - name: Cache gradle jars - uses: actions/cache@v1 - with: - path: ~/.gradle/caches/jars-3 - key: ${{ runner.os }}-gradlejars-${{ hashFiles('checksum.txt') }} - restore-keys: | - ${{ runner.os }}-gradlejars- - - - name: Cache gradle build - uses: actions/cache@v1 - with: - path: ~/.gradle/caches/build-cache-1 - key: ${{ runner.os }}-gradlebuildcache-${{ hashFiles('checksum.txt') }} - restore-keys: | - ${{ runner.os }}-gradlebuildcache- - - - name: Download gradle dependencies - run: ./gradlew dependencies - - - name: Build debug app - run: ./gradlew :app:assembleDebug - - - name: Clean secrets - run: release/signing-cleanup.sh - - - name: Send APK to Telegram - run: release/deploy-telegram.sh - env: - TG_TO: ${{ secrets.TELEGRAM_TO }} - TG_TOKEN: ${{ secrets.TELEGRAM_TOKEN }} - TG_FILE: ./app/build/outputs/apk/debug/app-debug.apk diff --git a/.github/workflows/deploy_snapshot.yml b/.github/workflows/deploy_snapshot.yml index 55086c17..e34e41bf 100644 --- a/.github/workflows/deploy_snapshot.yml +++ b/.github/workflows/deploy_snapshot.yml @@ -1,7 +1,7 @@ on: push: branches: - - master + - develop name: Deploy snapshot builds jobs: diff --git a/.github/workflows/draft_new_release.yml b/.github/workflows/draft_new_release.yml index f83afe61..0e91926b 100644 --- a/.github/workflows/draft_new_release.yml +++ b/.github/workflows/draft_new_release.yml @@ -10,13 +10,15 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + with: + ref: 'release' - name: Extract version from milestone run: | VERSION="${{ github.event.milestone.title }}" echo "::set-env name=RELEASE_VERSION::$VERSION" - name: Create release branch - run: git checkout -b release/${{ env.RELEASE_VERSION }} + run: git checkout -b release-${{ env.RELEASE_VERSION }} - name: Update changelog uses: thomaseizinger/keep-a-changelog-new-release@1.1.0 @@ -34,12 +36,12 @@ jobs: git commit --message "Prepare release ${{ env.RELEASE_VERSION }}" - name: Push new branch - run: git push origin release/${{ env.RELEASE_VERSION }} + run: git push origin release-${{ env.RELEASE_VERSION }} - name: Create pull request uses: thomaseizinger/create-pull-request@1.0.0 with: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - head: release/${{ env.RELEASE_VERSION }} - base: master + head: release-${{ env.RELEASE_VERSION }} + base: release title: Release ${{ env.RELEASE_VERSION }} -- cgit v1.2.3 From daedc3fa4bdfed6f86aab1c00cc3d664ac2d5fd0 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Sun, 28 Jun 2020 16:02:53 +0000 Subject: Prepare release 1.9.1 --- CHANGELOG.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 49ccec15..19d67d48 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ All notable changes to this project will be documented in this file. ## [Unreleased] +## [1.9.1] - 2020-06-28 + ### Fixed - Remember passphrase option did not work with old-style keys (generated either before 2019 or by passing `-m PEM` to new versions of OpenSSH) @@ -207,7 +209,9 @@ All notable changes to this project will be documented in this file. - Fix elements overlapping. -[Unreleased]: https://github.com/android-password-store/Android-Password-Store/compare/1.9.0...HEAD +[Unreleased]: https://github.com/android-password-store/Android-Password-Store/compare/1.9.1...HEAD + +[1.9.1]: https://github.com/android-password-store/Android-Password-Store/compare/1.9.0...1.9.1 [1.9.0]: https://github.com/android-password-store/Android-Password-Store/compare/1.8.1...1.9.0 -- cgit v1.2.3 From 52808fb1266d3a1763ba1fba0c79e5ef5367b5de Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Sun, 28 Jun 2020 21:34:26 +0530 Subject: build: bump version Signed-off-by: Harsh Shandilya --- app/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index cd2b0bc8..8b12e0d9 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -25,8 +25,8 @@ android { defaultConfig { applicationId 'dev.msfjarvis.aps' - versionCode 10900 - versionName '1.9.0' + versionCode 10910 + versionName '1.9.1' } lintOptions { -- cgit v1.2.3 From b663fbe64f41f34ed66842835876779d1f923e22 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Tue, 30 Jun 2020 14:37:59 +0530 Subject: Workaround to prevent crash on first run (#898) Signed-off-by: Harsh Shandilya (cherry picked from commit 57f125a4da9f8bad69c2b2e2e6540d245bdd44c4) Signed-off-by: Harsh Shandilya --- app/src/main/java/com/zeapo/pwdstore/SearchableRepositoryViewModel.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/java/com/zeapo/pwdstore/SearchableRepositoryViewModel.kt b/app/src/main/java/com/zeapo/pwdstore/SearchableRepositoryViewModel.kt index 69205241..05ccf28f 100644 --- a/app/src/main/java/com/zeapo/pwdstore/SearchableRepositoryViewModel.kt +++ b/app/src/main/java/com/zeapo/pwdstore/SearchableRepositoryViewModel.kt @@ -291,6 +291,7 @@ class SearchableRepositoryViewModel(application: Application) : AndroidViewModel recyclerViewState: Parcelable? = null, pushPreviousLocation: Boolean = true ) { + if (!newDirectory.exists()) return require(newDirectory.isDirectory) { "Can only navigate to a directory" } if (pushPreviousLocation) { navigationStack.push(NavigationStackEntry(_currentDir.value!!, recyclerViewState)) -- cgit v1.2.3 From d6891fa7a035845a7175df2307dd6e5f2cb1224b Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Tue, 30 Jun 2020 14:40:11 +0530 Subject: update changelog Signed-off-by: Harsh Shandilya --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 19d67d48..85f0e726 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. ## [Unreleased] +### Fixed + +- App crashes upon launching the app for the first time + ## [1.9.1] - 2020-06-28 ### Fixed -- cgit v1.2.3 From d8469d3790766b9db26bf93fc4e62b60629e1ba7 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Tue, 30 Jun 2020 09:32:17 +0000 Subject: Prepare release 1.9.2 --- CHANGELOG.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 85f0e726..dd85ffbd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ All notable changes to this project will be documented in this file. ## [Unreleased] +## [1.9.2] - 2020-06-30 + ### Fixed - App crashes upon launching the app for the first time @@ -213,7 +215,9 @@ All notable changes to this project will be documented in this file. - Fix elements overlapping. -[Unreleased]: https://github.com/android-password-store/Android-Password-Store/compare/1.9.1...HEAD +[Unreleased]: https://github.com/android-password-store/Android-Password-Store/compare/1.9.2...HEAD + +[1.9.2]: https://github.com/android-password-store/Android-Password-Store/compare/1.9.1...1.9.2 [1.9.1]: https://github.com/android-password-store/Android-Password-Store/compare/1.9.0...1.9.1 -- cgit v1.2.3 From 1a8e9ec1e4d215845fc5d2d808475e779ba44fe8 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Tue, 30 Jun 2020 15:14:39 +0530 Subject: Bump version Signed-off-by: Harsh Shandilya --- app/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 8b12e0d9..25040ca4 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -25,8 +25,8 @@ android { defaultConfig { applicationId 'dev.msfjarvis.aps' - versionCode 10910 - versionName '1.9.1' + versionCode 10920 + versionName '1.9.2' } lintOptions { -- cgit v1.2.3