load_cookie_context (main.py:136) can't parse any of the "Copy as cURL" formats that COOKIE_HELP.md tells users to produce. Only a raw Cookie: header string works.
The failure is silent — an unparseable file falls back to returning its first line verbatim — so the user hits Missing X-APPLE-WEBAUTH-USER from Apple and reads it as "my cookies are bad" rather than "the file didn't parse".
| Input format |
Result |
Raw Cookie: header string |
OK — 101 chars, exact |
curl … -b '…' (single quotes) |
BAD — returns the curl command line |
curl … -b "…" (double quotes) |
BAD — truncated to X-APPLE-WEBAUTH-USER= |
curl … -H "cookie: …" |
BAD — same truncation |
| Cookie-Editor JSON export |
BAD — returns the raw JSON |
printf 'curl "https://p68-maildomainws.icloud.com/v2/hme/list" \\\n -b '"'"'X-APPLE-WEBAUTH-USER="v=1:s=0:d=111111111"; x-apple-group=false'"'"'\n' > cookies.txt
uv run hidemyemail whoami --cookie-file cookies.txt
# -> Missing X-APPLE-WEBAUTH-USER cookie
Why
Two causes, neither platform-specific:
- Single quotes are never handled — only Windows
cmd (^"…"^) and double-quoted forms are. Chrome, Safari and Firefox on macOS and Linux all emit single quotes.
- Apple's cookie values are themselves double-quoted (
X-APPLE-WEBAUTH-USER="v=1:s=0:d=…"), and the quoted matchers stop at the first inner quote — so the double-quote and cookie: header paths return one truncated key.
Scope
- All five formats round-trip exactly, inner quotes intact.
- Accept Cookie-Editor's JSON export — same extension
README.md already recommends. Only name/value matter.
- An unparseable file is an explicit error naming the file and the accepted formats, never a silent fallback to line 1.
- One regression test per format, dummy values.
load_cookie_context(main.py:136) can't parse any of the "Copy as cURL" formats thatCOOKIE_HELP.mdtells users to produce. Only a rawCookie:header string works.The failure is silent — an unparseable file falls back to returning its first line verbatim — so the user hits
Missing X-APPLE-WEBAUTH-USERfrom Apple and reads it as "my cookies are bad" rather than "the file didn't parse".Cookie:header stringcurl … -b '…'(single quotes)curl … -b "…"(double quotes)X-APPLE-WEBAUTH-USER=curl … -H "cookie: …"Why
Two causes, neither platform-specific:
cmd(^"…"^) and double-quoted forms are. Chrome, Safari and Firefox on macOS and Linux all emit single quotes.X-APPLE-WEBAUTH-USER="v=1:s=0:d=…"), and the quoted matchers stop at the first inner quote — so the double-quote andcookie:header paths return one truncated key.Scope
README.mdalready recommends. Onlyname/valuematter.