Skip to content

Fix remove dot profilekey #278

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

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

Fix remove dot profilekey #278

wants to merge 2 commits into from

Conversation

ah-net
Copy link
Collaborator

@ah-net ah-net commented May 1, 2025

This fix removes the dot from the profile key since only characters are allowed. An . in the profile key causes the personal merchandising requests to not be personalised.

@ah-net ah-net requested a review from jansentjeu May 1, 2025 09:41
@@ -81,6 +81,6 @@ private function getCookieMetadata(): PublicCookieMetadata
*/
private function generateProfileKey(): string
{
return uniqid('', true);
return str_replace('.', '', uniqid('', true));
Copy link
Collaborator

Choose a reason for hiding this comment

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

Use the Magento\Framework\Math\Random::getRandomString() or Magento\Framework\Math\Random::getUniqueHash() method instead. These only contains lower chars, upper chars and digits

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