Skip to content

fix truncating signature on SAS#1007

Merged
roeap merged 2 commits intodelta-io:mainfrom
damiondoesthings:fix-truncated-sas
Dec 12, 2022
Merged

fix truncating signature on SAS#1007
roeap merged 2 commits intodelta-io:mainfrom
damiondoesthings:fix-truncated-sas

Conversation

@damiondoesthings
Copy link
Copy Markdown
Contributor

Description

This fixes the truncation of Azure SAS signatures ending in "=", i.e. when using non-url-encoded SAS tokens.

Related Issue(s)

closes #1003

Comment thread rust/src/builder/azure.rs Outdated
Some(k) => k,
};
let v = match kv.next().filter(|k| !k.chars().all(char::is_whitespace)) {
let kv = kv_pair_str.trim().split_once('=');
Copy link
Copy Markdown
Member

@houqp houqp Dec 11, 2022

Choose a reason for hiding this comment

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

This can be simplified to:

Suggested change
let kv = kv_pair_str.trim().split_once('=');
let (k, v) = kv_pair_str.trim().split_once('=').ok_or(BuilderError::MissingCredential)?;

houqp
houqp previously approved these changes Dec 11, 2022
Copy link
Copy Markdown
Collaborator

@roeap roeap left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this @damiondoesthings - LGTM!

@roeap roeap merged commit 3a9b9b3 into delta-io:main Dec 12, 2022
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.

Azure SAS signatures ending in "=" don't work

3 participants