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

fix: do not allow to override cookie header #35168

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

yury-s
Copy link
Member

@yury-s yury-s commented Mar 12, 2025

Behavior before this PR regarding 'Cookie' header already varied between browsers:

  • Chromium would not respect the 'Cookie' header if there was one with the same name in its cookie jar
  • WebKit would also take one from the cookie jar
    To override cookies addCookies should be used instead.

Reference #35154

@zuzusik
Copy link

zuzusik commented Mar 12, 2025

I can't agree this closes #35154

This adds tests to existing functionality, but I believe it has a bug, which is clearly reproduced in the repo linked to #35154

This comment has been minimized.

@yury-s yury-s changed the title test: overridden cookie header on redirect fix: do not allow to override cookie header Mar 13, 2025
Copy link
Contributor

Test results for "tests 1"

13 failed
❌ [chromium-library] › tests/library/har.spec.ts:276:3 › should record request overrides @chromium-ubuntu-22.04-node18
❌ [chromium-library] › tests/library/har.spec.ts:486:3 › should record failed request overrides @chromium-ubuntu-22.04-node18
❌ [chromium-library] › tests/library/har.spec.ts:276:3 › should record request overrides @chromium-ubuntu-22.04-node20
❌ [chromium-library] › tests/library/har.spec.ts:486:3 › should record failed request overrides @chromium-ubuntu-22.04-node20
❌ [chromium-library] › tests/library/har.spec.ts:276:3 › should record request overrides @chromium-ubuntu-22.04-node22
❌ [chromium-library] › tests/library/har.spec.ts:486:3 › should record failed request overrides @chromium-ubuntu-22.04-node22
❌ [firefox-library] › tests/library/har.spec.ts:276:3 › should record request overrides @firefox-ubuntu-22.04-node18
❌ [firefox-library] › tests/library/har.spec.ts:486:3 › should record failed request overrides @firefox-ubuntu-22.04-node18
❌ [firefox-page] › tests/page/page-route.spec.ts:169:3 › should override cookie header @firefox-ubuntu-22.04-node18
❌ [chromium-library] › tests/library/har.spec.ts:276:3 › should record request overrides @ubuntu-22.04-chromium-tip-of-tree
❌ [chromium-library] › tests/library/har.spec.ts:486:3 › should record failed request overrides @ubuntu-22.04-chromium-tip-of-tree
❌ [webkit-library] › tests/library/har.spec.ts:276:3 › should record request overrides @webkit-ubuntu-22.04-node18
❌ [webkit-library] › tests/library/har.spec.ts:486:3 › should record failed request overrides @webkit-ubuntu-22.04-node18

2 flaky ⚠️ [firefox-page] › tests/page/page-evaluate.spec.ts:403:3 › should throw for too deep reference chain @firefox-ubuntu-22.04-node18
⚠️ [chromium] › tests/headerView.spec.tsx:43:1 › should toggle filters @web-components-html-reporter

38738 passed, 807 skipped
✔️✔️✔️

Merge workflow run.

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.

2 participants