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

Invalid parsing/encoding of the URI userinfo #2

Closed
weierophinney opened this issue Dec 31, 2019 · 1 comment
Closed

Invalid parsing/encoding of the URI userinfo #2

weierophinney opened this issue Dec 31, 2019 · 1 comment

Comments

@weierophinney
Copy link
Member

Some characters are not properly parsed from string, and encoded when converted to string, in the userinfo. For example, the "@" char should be represented in strings as "%40" (but passed as "@" to the Authorization header for HTTP), and userinfo containing percent-encoded chars should be decoded/encoded the right way.

It seems that the following comment about "@" in https://github.com/zendframework/zend-uri/blob/master/src/Uri.php#L297 is wrong:

                // The userInfo can also contain '@' symbols; split $authority
                // into segments, and set it to the last segment.

form my understanding of the RFC-3986:

    userinfo    = *( unreserved / pct-encoded / sub-delims / ":" )
    unreserved  = ALPHA / DIGIT / "-" / "." / "_" / "~"
    pct-encoded = "%" HEXDIG HEXDIG
    sub-delims  = "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "="

Originally posted by @cricog at zendframework/zend-uri#20

@weierophinney
Copy link
Member Author

This package is considered feature-complete, and is now in security-only maintenance mode, following a decision by the Technical Steering Committee.
If you have a security issue, please follow our security reporting guidelines.
If you wish to take on the role of maintainer, please nominate yourself

If you are looking for an actively maintained package alternative, we recommend:

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

No branches or pull requests

1 participant