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

Convert PasswordString to String #9

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

rewrlution
Copy link

This PR is for fixing the issue mentioned here: #8

The root cause I believe is that the Settings.cs cannot be compiled because of this error:

Cannot implicitly convert type 'Microsoft.DotNet.Interactive.PasswordString' to 'string'

And since PasswordString has a ToString() method, we can simply invoke it and so that the compiler is happy and hence the notebote will be happy.

@rewrlution
Copy link
Author

Using ToString() method is a dumb idea, since the ToString() method is to return a hidden secret ************. I will need to study more about the PasswordString method to fix the bug properly.

@rewrlution
Copy link
Author

I should use the GetClearTextPassword() function instead of ToString() function.

I believe the ToString() function is used in the VSCode Editor where the editor just displays ****************** after users pasting their secrets, but when we save the secret to the local file, we should use GetClearTextPassword().

Tested and worked in my local box.

@rewrlution rewrlution reopened this Oct 11, 2023
@dbatay
Copy link

dbatay commented Nov 15, 2023

thanks mate, it resolves the issue. Hope this gets approved soon.

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.

None yet

2 participants