Skip to content

Fix latin-1 header errors during Apple 2FA#142

Open
b4mbo-o wants to merge 1 commit into
MatthewKuKanich:mainfrom
b4mbo-o:fix-issue-94-latin1-headers
Open

Fix latin-1 header errors during Apple 2FA#142
b4mbo-o wants to merge 1 commit into
MatthewKuKanich:mainfrom
b4mbo-o:fix-issue-94-latin1-headers

Conversation

@b4mbo-o

@b4mbo-o b4mbo-o commented May 18, 2026

Copy link
Copy Markdown

Summary

  • Normalize locale/timezone metadata headers to ASCII-safe values to avoid requests latin-1 header encoding failures on localized Windows environments.
  • Normalize trusted-device and SMS 2FA codes to ASCII digits, accepting full-width digits and stripping spaces/hyphens.

Testing

  • python -m py_compile AirTagGeneration/cores/pypush_gsa_icloud.py
  • Verified generated meta headers are ASCII-only and full-width 2FA input normalizes to ASCII digits locally.

Closes #94

@b4mbo-o b4mbo-o force-pushed the fix-issue-94-latin1-headers branch from b2fb551 to 2216d2e Compare May 18, 2026 17:03

@scruffyone23 scruffyone23 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

assert _normalize_2fa_code("123-456") == "123456"
assert _normalize_2fa_code("123456") == "123456" # full-width

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.

"request_reports" gives an issue

2 participants