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

[BUG] Persist cookie name cannot feature specific characters #1537

Conversation

martynaskre
Copy link
Contributor

⚡ PowerGrid - Pull Request

Motivation

  • Bug fix
  • Enhancement
  • New feature
  • Breaking change

Description

As we can see here, the tableName property is used to construct a persist cookie name. Table name can be any string, but if the string features characters such as " " (space) or other, the following exception will be thrown:

setcookie(): Argument #1 ($name) cannot contain "=", ",", ";", " ", "\t", "\r", "\n", "\013", or "\014"

With this limitation in mind, it is logical to hash persist key using cheap hash function such as md5. In addition to added table name hashing, this PR makes getPersistKey method protected which allows end user to customise it.

Related Issue(s): None.

Documentation

This PR requires Documentation update?

  • Yes
  • No
  • I have already submitted a Documentation pull request.

@luanfreitasdev
Copy link
Collaborator

Hello! I understand this is a support issue, but we no longer support version 3. In other words, the change may be time-locked and different from later versions.

Thank you

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