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(cookie.ts): fix cookies with equal signs #4005

Merged
merged 1 commit into from May 1, 2023

Conversation

ssttevee
Copy link
Contributor

@ssttevee ssttevee commented May 1, 2023

Overview

What is it?

  • Feature / enhancement
  • Bug
  • Docs / tests / types / typos

Description

Cookies with equal signs are be parsed incorrectly. Everything after and including the equal sign is dropped because of how String.prototype.split works. I have changed the parser to use String.prototype.indexOf and String.prototype.slice instead.

Use cases and why

Base64 encoding often include equal signs for padding.

Checklist:

  • My code follows the developer guidelines of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • Added new tests to cover the fix / functionality

@stackblitz
Copy link

stackblitz bot commented May 1, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@manucorporat manucorporat merged commit 6a57a24 into QwikDev:main May 1, 2023
19 checks passed
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.

None yet

2 participants