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

AZURE_STORAGE_SAS_TOKEN: prepend a ? when not included in token #1056

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions pkg/storages/azure/folder.go
Expand Up @@ -68,6 +68,11 @@ func ConfigureFolder(prefix string, settings map[string]string) (storage.Folder,
if accountToken, usingToken = settings[SasTokenSetting]; !usingToken {
return nil, NewCredentialError(AccessKeySetting)
}

// Tokens may or may not begin with ?, normalize these cases
if !strings.HasPrefix(accountToken, "?") {
accountToken = "?" + accountToken
}
}
if environmentName, ok = settings[EnvironmentName]; !ok {
environmentName = defaultEnvName
Expand Down