Skip to content

Re-encode tenant unicode characters in rust SDK#493

Closed
jfullerton44 wants to merge 2 commits intomainfrom
dev/jfullerton/rustUnicode
Closed

Re-encode tenant unicode characters in rust SDK#493
jfullerton44 wants to merge 2 commits intomainfrom
dev/jfullerton/rustUnicode

Conversation

@jfullerton44
Copy link
Copy Markdown
Collaborator

@jfullerton44 jfullerton44 commented Oct 17, 2024

Fixes https://github.com/devdiv-microsoft/basis-planning/issues/1658

Changes proposed:

  • Before sending the User-Agent-Policies header, we need to re-encode the header value to ensure that it is correctly formatted. This manually reencodes the " and ; as they are the only accepted characters in this field. Old value looked like %22tenantId%3DtenantId%22
  • Adds formatting changes

.to_str()
.unwrap()
.replace("%22", "")
.replace("%3B", ";");
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We already use the urlencoding module in this crate, you should be able to use it here: https://docs.rs/urlencoding/latest/urlencoding/#

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.

2 participants