Files
ZephCore/zephcore
rlwilliamson-dev fcd5fd8641 room-server: fix login when a password is set over a longer one
StrHelper::strncpy null-terminates but does NOT zero-pad the 16-byte
password buffer, so setting a shorter password over a longer previous
value (e.g. one inherited from a prior repeater config) leaves trailing
garbage. onAnonDataRecv's constant-time compare runs over the full
buffer width, so a correct password stopped matching — admin/guest
logins were silently rejected, or downgraded to a read-only guest when
allow_read_only was on (the login looked identical to read-only).

Fix: copy both stored passwords into zeroed buffers (up to strnlen)
before the constant-time compare, so the comparison reflects the actual
string while staying constant-time over the full width.

Hardware-verified on the kit: admin login with the correct password now
grants ADMIN (post + remote management), confirmed server-side via
get acl (perms 03).

Note: the repeater's handleLoginReq shares this latent issue.
2026-06-02 15:07:50 -05:00
..
2026-06-02 14:50:31 +02:00
2026-06-02 13:02:57 -05:00
2026-06-02 14:50:18 +02:00
2026-06-02 16:08:51 +02:00
2026-03-19 10:44:33 +01:00
2026-06-02 13:02:57 -05:00
2026-06-02 13:02:57 -05:00
2026-06-02 16:08:51 +02:00
2026-06-02 14:50:18 +02:00
2026-02-22 13:09:18 +01:00
2026-05-31 20:51:59 +02:00