Files
moonwell-client-core/crates/benilla-protocol
Sam Sung 19af95006b Unattended logins answer a PIN from WOW_PIN or WOW_PIN_TOTP (#2386)
An unattended login (`WOW_USER` plus `WOW_PASS`) could not answer a PIN-protected account's keypad, so it waited forever.

Two variables now answer it. They go through the same path as the keypad's `PINEntered`, with the same prompt check and the same state report:
- `WOW_PIN`: the digits, as typed.
- `WOW_PIN_TOTP`: a base32 secret. Its RFC 6238 code (HMAC-SHA1, 30 s step, 6 digits) is the PIN, the scheme vmangos verifies (`AuthSocket.cpp:1274`). The code is derived at each prompt, re-dials included.

Setting both is refused, and neither value is ever logged. The variables are documented under "Running it unattended".

Tests: the RFC 6238 vectors, a leading-zero code, each variable answering the prompt, both set refused, and fresh codes on a mocked clock. A live fixed-PIN login against vmangos passed.

Fixes #2371

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 09:46:06 +07:00
..