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

oauth/requestheaders: escape semicolon in URI #26596

Merged
merged 1 commit into from Nov 12, 2021

Conversation

stbenjam
Copy link
Member

There's an errant semicolon in one of the test cases in
oauth/requestheaders.go. Prior to 1.17, go handled this behavior and
treated it like a &. However, go's behavior has changed in 1.17[1]:

The net/url and net/http packages used to accept ";" (semicolon) as a
setting separator in URL queries, in addition to "&" (ampersand). Now,
settings with non-percent-encoded semicolons are rejected and net/http
servers will log a warning to Server.ErrorLog when encountering one in
a request URL.

For example, before Go 1.17 the Query method of the URL
example?a=1;b=2&c=3 would have returned map[a:[1] b:[2] c:[3]], while
now it returns map[c:[3]].

In go 1.17, the request is now parsed differently so the server returns
400 (bad request).

[1] https://golang.org/doc/go1.17#semicolons

There's an errant semicolon in one of the test cases in
oauth/requestheaders.go. Prior to 1.17, go handled this behavior and
treated it like a &.  However, go's behavior has changed in 1.17[1]:

    The net/url and net/http packages used to accept ";" (semicolon) as a
    setting separator in URL queries, in addition to "&" (ampersand). Now,
    settings with non-percent-encoded semicolons are rejected and net/http
    servers will log a warning to Server.ErrorLog when encountering one in
    a request URL.

    For example, before Go 1.17 the Query method of the URL
    example?a=1;b=2&c=3 would have returned map[a:[1] b:[2] c:[3]], while
    now it returns map[c:[3]].

In go 1.17, the request is now parsed differently so the server returns
400 (bad request).

[1] https://golang.org/doc/go1.17#semicolons
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 11, 2021
@deads2k
Copy link
Contributor

deads2k commented Nov 11, 2021

/assign @stlaz

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 11, 2021

@stbenjam: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-gcp-csi c3f7903 link false /test e2e-gcp-csi
ci/prow/e2e-aws-single-node c3f7903 link false /test e2e-aws-single-node

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@stbenjam
Copy link
Member Author

Serial failed, but not on that test, so that's something

/test e2e-aws-serial

@stlaz
Copy link
Member

stlaz commented Nov 12, 2021

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Nov 12, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 12, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: stbenjam, stlaz

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@stlaz
Copy link
Member

stlaz commented Nov 12, 2021

/retest-required

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

1 similar comment
@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit ae42804 into openshift:master Nov 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants