Skip to content

Conversation

@edigaryev
Copy link
Collaborator

Resolves #35.

@edigaryev edigaryev requested a review from fkorotkov September 5, 2022 16:40
@@ -0,0 +1,13 @@
grammar Reference;
Copy link
Contributor

Choose a reason for hiding this comment

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

What the origin of this grammar? You compiled it from a spec? Would be nice to have a link here.

Copy link
Collaborator Author

@edigaryev edigaryev Sep 5, 2022

Choose a reason for hiding this comment

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

No, it's a port of the old grammar that Tart used, but more (1) readable/editable and (2) strict w.r.t. potential path traversal (see d8a71ec).

I've realized that it's not worth porting the "official spec" because Tart is not a registry, so it's parser could be more relaxed, however, it needs to safely handle potential path traversal (e.g. with ../../..).

@edigaryev edigaryev requested a review from fkorotkov September 5, 2022 20:30
@edigaryev edigaryev merged commit ae7018c into main Sep 6, 2022
@edigaryev edigaryev deleted the improve-remote-name-parser branch September 6, 2022 13:28
edigaryev added a commit that referenced this pull request Sep 6, 2022
edigaryev added a commit that referenced this pull request Sep 6, 2022
edigaryev added a commit that referenced this pull request Oct 11, 2022
* Improve RemoteName parser

* Remove Parsing import

* Permit namespace components to contain separators, but no more than one

* Add testNoPathTraversal
edigaryev added a commit that referenced this pull request Oct 11, 2022
* Improve RemoteName parser

* Remove Parsing import

* Permit namespace components to contain separators, but no more than one

* Add testNoPathTraversal
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.

Improve RemoteName parser

3 participants