Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

update path validator to enforce no beginning or ending of the separator #6233

Merged
merged 2 commits into from
May 15, 2020

Conversation

colin-axner
Copy link
Contributor

Description

Updates path validator to enforce that no path can begin or end with the separator. Previously both were allowed, but I believe this goes against the ICS spec which states:

The separator "/" is used to separate and concatenate two identifiers or an identifier and a constant bytestring. Identifiers MUST NOT contain the "/" character, which prevents ambiguity.

IMO beginning or ending with the separator is ambiguous to whether the separator is apart of the identifier name (which isn't allowed) or if the second identifier is an empty string (again not allowed). It is also more logical that a separator is always used to separate either two identifiers or an identifier and a constant byte string.

continuation of #6227

@auto-comment
Copy link

auto-comment bot commented May 15, 2020

👋 Thanks for creating a PR!

Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.


For contributor use:

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer

For admin use:

  • Added appropriate labels to PR (ex. WIP, R4R, docs, etc)
  • Reviewers assigned
  • Squashed all commits, uses message "Merge pull request #XYZ: [title]" (coding standards)

Thank you for your contribution to the Cosmos-SDK! 🚀

Copy link
Contributor

@alexanderbez alexanderbez left a comment

Choose a reason for hiding this comment

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

utACK 🎉

@codecov
Copy link

codecov bot commented May 15, 2020

Codecov Report

Merging #6233 into master will decrease coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #6233      +/-   ##
==========================================
- Coverage   54.76%   54.75%   -0.02%     
==========================================
  Files         447      447              
  Lines       26904    26896       -8     
==========================================
- Hits        14734    14726       -8     
  Misses      11126    11126              
  Partials     1044     1044              

Copy link
Collaborator

@fedekunze fedekunze left a comment

Choose a reason for hiding this comment

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

ACK 👍 good catch

@fedekunze fedekunze merged commit 86a9750 into master May 15, 2020
@fedekunze fedekunze deleted the colin/path-validator branch May 15, 2020 18:58
jackzampolin pushed a commit that referenced this pull request May 22, 2020
… separator (#6233)

* update path validator to enforce no beginning or ending of the separator

* modify test slightly
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants