Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wire in fallback key selection flow #958

Merged
merged 16 commits into from Jul 23, 2020
Merged

Wire in fallback key selection flow #958

merged 16 commits into from Jul 23, 2020

Conversation

msfjarvis
Copy link
Member

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates

📜 Description

Brings back GetKeyIdsActivity and uses that to let users select a key in case we are unable to find one.

💡 Motivation and Context

Should reasonably fix #955

💚 How did you test it?

📝 Checklist

  • I formatted the code with the IDE's reformat action (Ctrl + Shift + L/Cmd + Shift + L)
  • I reviewed submitted code
  • I added a CHANGELOG entry if applicable

🔮 Next steps

📸 Screenshots / GIFs

fmeum and others added 2 commits July 23, 2020 12:43
@msfjarvis msfjarvis added this to the 1.11.0 milestone Jul 23, 2020
msfjarvis and others added 6 commits July 23, 2020 16:46
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
…-id-fallbacks

* origin/fix_key_id_parsing:
  Fix a crash when parsing long key IDs
* develop:
  Fix a crash when parsing long key IDs (#959)
  Allow Autofill on custom views with Autofill hints (#946)
* develop:
  Fix a crash when parsing long key IDs (#959)
  Allow Autofill on custom views with Autofill hints (#946)
  Migrate to Gradle Kotlin DSL (#936)
  build: upgrade all dependencies (#953)
  github: create release as draft
* fix_key_id_parsing:
  Fix OpenPgpApi extra type confusion

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
@msfjarvis msfjarvis marked this pull request as ready for review July 23, 2020 13:43
@msfjarvis msfjarvis requested a review from fmeum July 23, 2020 13:43
msfjarvis and others added 2 commits July 23, 2020 19:30
* develop:
  Fix OpenPgpApi extra type confusion (#960)

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
@fmeum
Copy link
Member

fmeum commented Jul 23, 2020

Could you test this again and verify that my refactoring in 05f68da didn't break anything?

fmeum
fmeum previously approved these changes Jul 23, 2020
@msfjarvis
Copy link
Member Author

Could you test this again and verify that my refactoring in 05f68da didn't break anything?

It does work, but we need to get committing in order. The flow from empty .gpg-id -> key selection -> write file -> encrypt password generates two commits for me. The first contains the newly encrypted password and the addition of a hex key ID into .gpg-id, and the next one is empty. Ideally we'd commit the .gpg-id update separately, and the password creation separately.

@msfjarvis
Copy link
Member Author

Oh, and this also needs changelog entries.

@fmeum
Copy link
Member

fmeum commented Jul 23, 2020

Supporting all identities in .gpg-id and all selected ones instead of just the first line/selected key ID does not require additional effort, so I changed that. I will now look into the commit order.

fmeum and others added 2 commits July 23, 2020 17:06
Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>
@fmeum
Copy link
Member

fmeum commented Jul 23, 2020

@msfjarvis Could you check whether the changes are now committed separately?

@msfjarvis
Copy link
Member Author

@msfjarvis Could you check whether the changes are now committed separately?

They are. However my previous, albeit unlikely, test case of having a .gpg-id file that is nothing but an empty line doesn't work anymore.

@msfjarvis
Copy link
Member Author

@FabianHenneke we can merge this and then I can start off the 1.10.1 release process.

@fmeum
Copy link
Member

fmeum commented Jul 23, 2020

@msfjarvis Could you check whether the changes are now committed separately?

They are. However my previous, albeit unlikely, test case of having a .gpg-id file that is nothing but an empty line doesn't work anymore.

This should show an error snackbar, but maybe it doesn't since this is parsed as an empty user ID. What does happen for you?

@msfjarvis
Copy link
Member Author

@msfjarvis Could you check whether the changes are now committed separately?

They are. However my previous, albeit unlikely, test case of having a .gpg-id file that is nothing but an empty line doesn't work anymore.

This should show an error snackbar, but maybe it doesn't since this is parsed as an empty user ID. What does happen for you?

It does show an error snackbar. Earlier, it'd prompt me to select a key.

@fmeum
Copy link
Member

fmeum commented Jul 23, 2020

@msfjarvis Could you check whether the changes are now committed separately?

They are. However my previous, albeit unlikely, test case of having a .gpg-id file that is nothing but an empty line doesn't work anymore.

This should show an error snackbar, but maybe it doesn't since this is parsed as an empty user ID. What does happen for you?

It does show an error snackbar. Earlier, it'd prompt me to select a key.

The last commit I made should fix that, I'm simply ignoring blank lines now.

I agree that this should be good to go. Do you want to add a changelog entry to this PR or a separate one?

@msfjarvis
Copy link
Member Author

@msfjarvis Could you check whether the changes are now committed separately?

They are. However my previous, albeit unlikely, test case of having a .gpg-id file that is nothing but an empty line doesn't work anymore.

This should show an error snackbar, but maybe it doesn't since this is parsed as an empty user ID. What does happen for you?

It does show an error snackbar. Earlier, it'd prompt me to select a key.

The last commit I made should fix that, I'm simply ignoring blank lines now.

I agree that this should be good to go. Do you want to add a changelog entry to this PR or a separate one?

Add it to this one, let's get everything sorted.

@msfjarvis msfjarvis merged commit 084b833 into android-password-store:develop Jul 23, 2020
@msfjarvis msfjarvis deleted the bug/gpg-id-fallbacks branch July 23, 2020 15:59
@msfjarvis msfjarvis modified the milestones: 1.11.0, 1.10.1 Jul 23, 2020
@fmeum fmeum mentioned this pull request Jul 23, 2020
8 tasks
msfjarvis added a commit that referenced this pull request Jul 26, 2020
* develop: (28 commits)
  Allow creating nested directories
  CHANGELOG: update
  Show parent path on all types
  github: upload test reports on failure
  build: update APK cruft exclusion list
  Properly handle files without passwords (#969)
  Expand OTP and PasswordEntry tests (#968)
  README: clarify build types (#966)
  build: prepare next development version
  build: bump version
  Prepare release 1.10.1
  Add CHANGELOG entries for 1.10.1 (#961)
  Wire in fallback key selection flow (#958)
  Fix OpenPgpApi extra type confusion (#960)
  Fix a crash when parsing long key IDs (#959)
  Add CHANGELOG entries for 1.10.1 (#961)
  Wire in fallback key selection flow (#958)
  Fix OpenPgpApi extra type confusion (#960)
  Fix a crash when parsing long key IDs (#959)
  Allow Autofill on custom views with Autofill hints (#946)
  ...

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
msfjarvis added a commit that referenced this pull request Jul 27, 2020
* develop:
  Allow creating nested directories
  CHANGELOG: update
  Show parent path on all types
  github: upload test reports on failure
  build: update APK cruft exclusion list
  Properly handle files without passwords (#969)
  Expand OTP and PasswordEntry tests (#968)
  build: prepare next development version
  build: bump version
  Prepare release 1.10.1
  Add CHANGELOG entries for 1.10.1 (#961)
  Wire in fallback key selection flow (#958)
  Fix OpenPgpApi extra type confusion (#960)
  Fix a crash when parsing long key IDs (#959)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG]Can not create passwords
3 participants