From fd7664239bffceaef2c233f74466304a4cf85aaa Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 31 Jan 2019 22:06:08 +0300 Subject: fix for possible problem with cyrillic file names in NTLM auth --- src/mir_app/src/netlibsecurity.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mir_app/src/netlibsecurity.cpp b/src/mir_app/src/netlibsecurity.cpp index 86bfb51209..b30146e7ca 100644 --- a/src/mir_app/src/netlibsecurity.cpp +++ b/src/mir_app/src/netlibsecurity.cpp @@ -342,8 +342,8 @@ char* NtlmCreateResponseFromChallenge(HANDLE hSecurity, const char *szChallenge, if (!login || !psw) return nullptr; - CMStringA szAuth(FORMAT, "%S:%S", login, psw); - szOutputToken = mir_base64_encode(szAuth.c_str(), szAuth.GetLength()); + T2Utf szAuth(CMStringW(FORMAT, L"%s:%s", login, psw)); + szOutputToken = mir_base64_encode(szAuth.get(), mir_strlen(szAuth)); complete = true; } -- cgit v1.2.3