Improve how the $password is converted to plain text#9
Merged
brentkeller merged 1 commit intomainfrom Jan 5, 2024
Merged
Conversation
This previous technique was only returning the first character when running the script from on non-Windows environments
Contributor
|
I'm going to review this tomorrow |
fredrodlima
approved these changes
Jan 5, 2024
Contributor
fredrodlima
left a comment
There was a problem hiding this comment.
Changes looks good. I was able to login successfully using the manifest and my account for triggering an instance export. Sorry for missing this review since I came back BK! Nice work on fixing this for us!
Member
|
FYI: this change is only supported in Powershell 7+ |
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Solves
FD: https://helpdesk.devresults.com/a/tickets/9494
A client reported getting the following error:
401: An error occurred when logging inThis turned out to be a "wrong password" response coming from the server because the
$passwordparameter was not properly being converted back to a plain text string on non-Window environments.Description
It seems that the previous technique was only returning the first character when running the script from on non-Windows environments. I've replaced our previous conversion of
$passwordwith ConvertFrom-SecureString, which seems to work properly.Testing
InstanceExport.ps1with the manifest and verify that the login still works (on Windows and/or another OS)