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

fix(SecretAccountStore): workaround DONT_MATCH_NAME #742

Merged
merged 1 commit into from
Jan 10, 2024

Conversation

GeopJr
Copy link
Owner

@GeopJr GeopJr commented Jan 9, 2024

fix: #701 #114 again

What's did #701 do?

When searching for secrets (saved accounts) in the keyring, we encountered issues with the keyring not unlocking in some setups. The solution was to retrieve ALL secrets that match the schema and not just Tuba's (#134, #114). However when working on another app that used the same schema as Tuba's I noticed that the two were reading each other's secrets and failing to load them (as expected) so I reverted the change on #701. Now there are two problems, both #114 and the one just described.

What does this PR do?

It reverts #701 but to prevent the new problem, it checks if the label is "Mastodon Account" (not so reliable) and if xdg:schema matches the app id (dev.geopjr.Tuba) and skips the secret if it doesn't.

@GeopJr GeopJr force-pushed the fix/secretaccountstore/workaround-dont-match-name branch from 07b2bf9 to 1773f51 Compare January 10, 2024 13:50
@GeopJr GeopJr merged commit ea8933a into main Jan 10, 2024
5 checks passed
@GeopJr GeopJr deleted the fix/secretaccountstore/workaround-dont-match-name branch January 10, 2024 13:51
@LukaszH77
Copy link
Contributor

I tried ea8933a and it asks me to log in every time and had to go back to previous commit.

@GeopJr
Copy link
Owner Author

GeopJr commented Jan 11, 2024

Could you help me debug it by running #743?

It will log some critical messages when you start tuba for every saved account, it will look like this, at the top:

(dev.geopjr.Tuba:12004): Tuba-CRITICAL **: 18:09:13.208: SecretAccountStore.vala:78: SECRET-DEBUG:
label: Mastodon Account
has_schema: true
schema: dev.geopjr.Tuba
domain: dev.geopjr.Tuba
skip: false

@LukaszH77
Copy link
Contributor

$ flatpak run dev.geopjr.Tuba

(dev.geopjr.Tuba:2): Tuba-CRITICAL **: 17:22:43.676: SecretAccountStore.vala:78: SECRET-DEBUG:
label: Konto Mastodon
has_schema: false
skip: true

(dev.geopjr.Tuba:2): Tuba-CRITICAL **: 17:22:43.676: SecretAccountStore.vala:78: SECRET-DEBUG:
label: Konto Mastodon
has_schema: false
skip: true

@GeopJr
Copy link
Owner Author

GeopJr commented Jan 11, 2024

Thanks! It was very helpful!

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.

2 participants