Unifi-Voucher-Tool/includes
Claude 897392041a
Fix session cookie not persisting due to Partitioned attribute
The TOKEN cookie set by UniFi OS includes the 'Partitioned' attribute
(CHIPS), which some libcurl versions do not write to the Netscape cookie
jar file. This caused every API request to go out unauthenticated,
resulting in 401/403 errors even after a successful login.

Fix: extract the TOKEN value directly from the Set-Cookie response
header in login() and pass it via CURLOPT_COOKIE in apiRequest(),
bypassing the broken file-based cookie jar. Cookie file remains as
fallback for environments where extraction fails.

Also update test.php section 8 to validate this fix and show the
extracted cookie value.

https://claude.ai/code/session_01UsuvFAmmeagtQa14QA4iaq
2026-04-22 05:41:42 +00:00
..
Auth.php Fix sites freeze bug, add features and shorten README 2026-04-21 16:08:08 +00:00
Database.php Fix sites freeze bug, add features and shorten README 2026-04-21 16:08:08 +00:00
Mailer.php Fix sites freeze bug, add features and shorten README 2026-04-21 16:08:08 +00:00
UniFiController.php Fix session cookie not persisting due to Partitioned attribute 2026-04-22 05:41:42 +00:00