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

WIP: TAKS: Improve node address serialisation #5067

Closed
wants to merge 3 commits into from

Conversation

mhsdesign
Copy link
Member

Followup to #4892 with the intent to optimise the NodeAddress uri serialisation.

Currently using base64 + json produces bigger output for dsps and also the default case (empty) is not particular pretty.
Additionally base64 as used currently is actually not safe due the = padding. Which could produce problems when used as query parameter.

See also #4564 (comment) for the discussion

Upgrade instructions

Review instructions

Checklist

  • Code follows the PSR-2 coding style
  • Tests have been created, run and adjusted as needed
  • The PR is created against the lowest maintained branch
  • Reviewer - PR Title is brief but complete and starts with FEATURE|TASK|BUGFIX
  • Reviewer - The first section explains the change briefly for change-logs
  • Reviewer - Breaking Changes are marked with !!! and have upgrade-instructions


final public function toUriRepresentation(): string
{
return str_replace('=', '~', base64_encode(http_build_query($this->coordinates)));
Copy link
Member

Choose a reason for hiding this comment

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

Yikes, I might need ot understand how this is supposed to be used? Why not just jsonify?

@kitsunet
Copy link
Member

Suggestion #5072

@mhsdesign
Copy link
Member Author

As discussed in #5072 we want to stick with json

@mhsdesign mhsdesign closed this May 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants