-
Notifications
You must be signed in to change notification settings - Fork 18k
x/website: 1.20 release notes should mention updated cookie validation #58485
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
Comments
Just to be clear, I think the go1.20 version does have the better behavior and I prefer it TBH. However, it would be nice to see the change documented in the go1.20 release notes if possible. Thanks. |
Related: #52989 |
feel free to send a CL |
@seankhliao Thanks for the feedback. I would love to make a CL! Could you point me to the repository where I could make this documentation change? |
@prattmic @seankhliao I created the above PR/CL to update the go1.20 release notes. Please let me know if there are any changes that are needed. |
Fixes golang/go#58485 Add a release note documenting that Cookie.Valid ignores the Cookie.Expires field when empty. Signed-off-by: Warren Fernandes <[email protected]>
I think this issue can be closed since golang/website#193 has been merged. Thanks for the help and direction. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes. This issue is a difference in behavior between go1.19.5 and go 1.20
What operating system and processor architecture are you using (
go env
)?go env
Trimmed OutputWhat did you do?
https://go.dev/play/p/Epzlq8U-v_N
Upon running the above example code in go1.20 we get the output of
valid cookie
however when we switch to the previous minor version go1.19, we get the errorhttp: invalid Cookie.Expires
.What did you expect to see?
I expected to see the same behavior between versions since this behavior was not explicitly documented in the go1.20 release notes for net/http.
What did you see instead?
I saw a difference in behavior.
In go1.20 we check
Cookie.Expires.IsZero
however in go1.19 we don't perform that additional check.https://github.com/golang/go/blob/release-branch.go1.20/src/net/http/cookie.go#L250
vs.
https://github.com/golang/go/blob/release-branch.go1.19/src/net/http/cookie.go#L249
The text was updated successfully, but these errors were encountered: