All TightVNC server settings (passwords, ports, ACLs) silently revert
after a service restart due to a bug in RegistrySettingsManager.
setString() (config-lib/RegistrySettingsManager.cpp:132):
RegistryKey subKey(m_key, keyName.getString(), false);
return subKey.setValueAsString(name, value); // BUG
extractValueName() correctly extracts leaf name "PrimaryPassword" from
"Server\PrimaryPassword", but the write passes the full compound path
as the value name. getString() reads back using the leaf name and finds
nothing. Same bug in setLong() (line 158) and setInt() (line 209).
To reproduce:
Attached PoC does the live registry write/read roundtrip and shows
QueryValueEx('PrimaryPassword') returns None while the data is actually
stored under 'Server\PrimaryPassword'.
Fix: pass valueName.getString() instead of name in lines 132, 158, 209.
Version: 2.8.87.