Skip to content

Commit

Permalink
fixup! Password-reveal: Respect group policy setting, if any
Browse files Browse the repository at this point in the history
- Minor edit in registry.c
  • Loading branch information
selvanair authored and lstipakov committed Apr 26, 2023
1 parent fa1191b commit 14c7a69
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion registry.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ GetRegistryKeys ()
}

/* Read group policy setting for password reveal */
status = RegOpenKeyEx(HKEY_CURRENT_USER, L"Software\\Policies\\Microsoft\\Windows\\CredUI", 0, KEY_READ, &regkey);
status = RegOpenKeyExW(HKEY_CURRENT_USER, L"Software\\Policies\\Microsoft\\Windows\\CredUI", 0, KEY_READ, &regkey);
if (status != ERROR_SUCCESS
|| !GetRegistryValueNumeric(regkey, L"DisablePasswordReveal", &o.disable_password_reveal))
{
Expand All @@ -225,7 +225,9 @@ GetRegistryKeys ()
PrintDebug(L"from policy: %ls = %lu", L"DisablePasswordReveal", o.disable_password_reveal);
}
if (status == ERROR_SUCCESS)
{
RegCloseKey(regkey);
}

ExpandOptions ();
return true;
Expand Down

0 comments on commit 14c7a69

Please sign in to comment.