Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Ensure secret exists when tyring to read as text #476

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jsimonet
Copy link

@jsimonet jsimonet commented Nov 7, 2022

Requirements for Contributing a Bug Fix

Identify the Bug

#477

Description of the Change

Ensure the variable secret is not NULL before passing it to the function secret_value_get_text.

Alternate Designs

An alternate design could be to use a GCancellable object in secret_service_search_sync function call. I tried to use it but failed to understand how to use it.

Possible Drawbacks

This MR should not add a possible drawback.

Verification Process

Test suite still pass (npm run test).
Using FindCredentials without unlocking my keystore in my electron app does not crash anymore.

The error I got during my usage was:

  (process:280213): libsecret-CRITICAL **: 16:02:21.069: secret_value_get_text: assertion 'value' failed

Release Notes

Fixed a bug where calling FindCredentials without unlocking the keystore on Linux.

@jsimonet jsimonet force-pushed the dev/prevent-fix-findcredentials branch from 91ed7bd to 5dc6af0 Compare November 16, 2022 09:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant