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

Delete legacy cookie before setting new cookie #31306

Merged
merged 2 commits into from
Jun 11, 2024

Conversation

wxiaoguang
Copy link
Contributor

Try to fix #31202

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jun 10, 2024
@pull-request-size pull-request-size bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jun 10, 2024
@github-actions github-actions bot added the modifies/go Pull requests that update Go code label Jun 10, 2024
@silverwind
Copy link
Member

silverwind commented Jun 10, 2024

Hmm, so the problem is the order of the Set-Cookie headers? This should only be an issue if we Set-Cookie the same cookie name/path in multiple headers, are we really doing that? I think we should instead issue only one single Set-Cookie per name/path combo.

@AdamMajer
Copy link
Contributor

The problem is that the cookie with "/" in path can match cookies without the trailing "/" and overwrite them. It even depends on browser version. So the change looks OK but is client specific.

Copy link
Member

@silverwind silverwind left a comment

Choose a reason for hiding this comment

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

Ok if it works

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Jun 10, 2024
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Jun 10, 2024
@delvh delvh added type/bug lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. topic/authentication and removed lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. labels Jun 10, 2024
@lunny lunny added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Jun 11, 2024
@lunny lunny merged commit 5342a61 into go-gitea:main Jun 11, 2024
26 checks passed
@GiteaBot GiteaBot added this to the 1.23.0 milestone Jun 11, 2024
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Jun 11, 2024
@wxiaoguang wxiaoguang deleted the fix-delete-legacy-cookie branch June 11, 2024 04:03
@wxiaoguang wxiaoguang added the backport/v1.22 This PR should be backported to Gitea 1.22 label Jun 11, 2024
GiteaBot pushed a commit to GiteaBot/gitea that referenced this pull request Jun 11, 2024
@GiteaBot GiteaBot added the backport/done All backports for this PR have been created label Jun 11, 2024
wxiaoguang added a commit that referenced this pull request Jun 11, 2024
Backport #31306 by wxiaoguang

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
zjjhot added a commit to zjjhot/gitea that referenced this pull request Jun 11, 2024
* giteaofficial/main:
  Fix line number width in code preview (go-gitea#31307)
  Delete legacy cookie before setting new cookie (go-gitea#31306)
  [skip ci] Updated translations via Crowdin
  Use `querySelector` over alternative DOM methods (go-gitea#31280)
  Remove jQuery `.text()` (go-gitea#30506)
  [skip ci] Updated translations via Crowdin
  Remove sub-path from container registry realm (go-gitea#31293)
  Fix some URLs whose sub-path is missing (go-gitea#31289)
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Sep 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/done All backports for this PR have been created backport/v1.22 This PR should be backported to Gitea 1.22 lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/go Pull requests that update Go code size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. topic/authentication type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sign in not possible behind tinyproxy with sub-path
6 participants