Skip to content

Commit a3d3b33

Browse files
committed
MAGE-881: Cap auth user token length for legacy FE
1 parent 87530d7 commit a3d3b33

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Helper/InsightsHelper.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ class InsightsHelper
1717

1818
public const ALGOLIA_CUSTOMER_USER_TOKEN_COOKIE_NAME = 'aa-search';
1919

20+
/**
21+
* Up to 129 chars per https://www.algolia.com/doc/rest-api/insights/#method-param-usertoken
22+
* But capping at legacy 64 chars for backward compat
23+
*/
24+
/** @var int */
25+
public const ALGOLIA_USER_TOKEN_MAX_LENGTH = 64;
26+
2027
/** @var ConfigHelper */
2128
private $configHelper;
2229

@@ -25,7 +32,7 @@ class InsightsHelper
2532

2633
/** @var SessionManagerInterface */
2734
private $sessionManager;
28-
35+
2936
/** @var CookieManagerInterface */
3037
private $cookieManager;
3138

0 commit comments

Comments
 (0)