Closed jackpoz closed 3 years ago
Hi! Thank you for PR. Your change assumes that the entry added to the credential store is always an URL, but what if I would want to add 'MyLabel/' ? I know it's a trivial example, but technically we have supported this. Your change makes this entry being added as 'MyLabel'. This scenario would fail:
Add-PnPStoredCredential -Name 'MyLabel/' -UserName ... -Password ...
Get-PnPStoredCredential -Name 'MyLabel/'
Adding to this: as @ToddKlindt mentions in the issue: we should fix this rather in the logic where we determine the credential manager entry to use.
Type
Related Issues?
Fixes #2920
What is in this Pull Request ?
Remove trailing '/' at the end of the url when calling Add-PnPStoredCredential. I can't think of a case when it would be needed to keep the '/' character at the end of the url when stored in the credentials manager.