Skip to content

Commit

Permalink
#4287 auth api changed password to byte strings
Browse files Browse the repository at this point in the history
so we have to decode them before calling LogonUser
  • Loading branch information
totaam committed Jul 6, 2024
1 parent dac1c04 commit ab9e79b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions xpra/platform/win32/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@
def check(domain="", username: str = "", password: bytes = b"") -> bool:
token = HANDLE()
# domain = os.environ.get('COMPUTERNAME')
pstr = password.decode("utf8")
if LOG_CREDENTIALS:
log("LogonUser(%s, %s, %s, CLEARTEXT, DEFAULT, %#x)",
username, domain, password, addressof(token))
status = LogonUser(username, domain, password,
username, domain, pstr, addressof(token))
#LogonUser.argtypes = [LPCWSTR, LPCWSTR, LPCWSTR, DWORD, DWORD, POINTER(HANDLE)]
status = LogonUser(username, domain, pstr,
LOGON32_LOGON_NETWORK_CLEARTEXT,
LOGON32_PROVIDER_DEFAULT,
byref(token))
Expand Down

0 comments on commit ab9e79b

Please sign in to comment.