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

Re-encode tenant unicode characters in rust SDK #493

Closed
wants to merge 2 commits into from

Conversation

jfullerton44
Copy link
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
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