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

Trim '?' off SAS Tokens #195

Merged
merged 8 commits into from
Apr 24, 2023
Merged

Trim '?' off SAS Tokens #195

merged 8 commits into from
Apr 24, 2023

Conversation

ashanhol
Copy link
Contributor

Fixes #638
This PR expands SAS Token properties' setters to trim off any possible leading '?' characters.

There appears to be one other place a SAS Token is referenced in GetMappedSasContainerUrlFromWsmAsync() but that's already trimming a leading / caracter

public string SasToken
{
get => sasToken;
set => sasToken = value.TrimStart('?');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add the null-conditional operator in case someone tries to set as null

set => sasToken = value?.TrimStart('?');

@ashanhol ashanhol merged commit a2a40cb into main Apr 24, 2023
@ashanhol ashanhol deleted the adinas/StripSasTokenQ branch April 24, 2023 17:51
@ngambani ngambani added this to the 4.3.0 milestone Apr 28, 2023
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.

Always trim '?' from the start of SAS tokens
3 participants