Skip to content

Commit

Permalink
New release 5.9.3.1
Browse files Browse the repository at this point in the history
FIX: Better special characters support in username and password
ENH: Accounts with Without2FA tokens can now also be stored in cache
  • Loading branch information
multiOTP committed Oct 21, 2022
1 parent f147839 commit a8852ec
Show file tree
Hide file tree
Showing 15 changed files with 222 additions and 181 deletions.
4 changes: 2 additions & 2 deletions CppClientCore/CppClientCore/MultiOTP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
* multiOTP Credential Provider, extends privacyIdea
*
* @author Yann Jeanrenaud, SysCo systemes de communication sa, <[email protected]>
* @version 5.9.2.1
* @date 2022-08-10
* @version 5.9.3.1
* @date 2022-10-21
* @since 2021
* @copyright (c) 2016-2022 SysCo systemes de communication sa
* @copyright (c) 2015-2016 ArcadeJust ("RDP only" enhancement)
Expand Down
4 changes: 2 additions & 2 deletions CppClientCore/CppClientCore/MultiOTP.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
* multiOTP Credential Provider, extends privacyIdea
*
* @author Yann Jeanrenaud, SysCo systemes de communication sa, <[email protected]>
* @version 5.9.2.1
* @date 2022-08-10
* @version 5.9.3.1
* @date 2022-10-21
* @since 2021
* @copyright (c) 2016-2022 SysCo systemes de communication sa
* @copyright (c) 2015-2016 ArcadeJust ("RDP only" enhancement)
Expand Down
4 changes: 2 additions & 2 deletions CppClientCore/CppClientCore/MultiOTPRegistryReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
* multiOTP Credential Provider, extends privacyIdea RegistryReader
*
* @author Yann Jeanrenaud, SysCo systemes de communication sa, <[email protected]>
* @version 5.9.2.1
* @date 2022-08-10
* @version 5.9.3.1
* @date 2022-10-21
* @since 2021
* @copyright (c) 2016-2022 SysCo systemes de communication sa
* @copyright (c) 2015-2016 ArcadeJust ("RDP only" enhancement)
Expand Down
4 changes: 2 additions & 2 deletions CppClientCore/CppClientCore/MultiOTPRegistryReader.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
* multiOTP Credential Provider, extends privacyIdea RegistryReader
*
* @author Yann Jeanrenaud, SysCo systemes de communication sa, <[email protected]>
* @version 5.9.2.1
* @date 2022-08-10
* @version 5.9.3.1
* @date 2022-10-21
* @since 2021
* @copyright (c) 2016-2022 SysCo systemes de communication sa
* @copyright (c) 2015-2016 ArcadeJust ("RDP only" enhancement)
Expand Down
35 changes: 28 additions & 7 deletions CppClientCore/CppClientCore/MultiotpHelpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* Extra code provided "as is" for the multiOTP open source project
*
* @author Andre Liechti, SysCo systemes de communication sa, <[email protected]>
* @version 5.9.2.1
* @date 2022-08-10
* @version 5.9.3.1
* @date 2022-10-21
* @since 2013
* @copyright (c) 2016-2022 SysCo systemes de communication sa
* @copyright (c) 2015-2016 ArcadeJust ("RDP only" enhancement)
Expand Down Expand Up @@ -1293,6 +1293,7 @@ HRESULT multiotp_request(_In_ std::wstring username,
DWORD server_cache_level = 1;
PWSTR shared_secret;
PWSTR servers;
std::wstring shared_secret_escaped;

server_timeout = readRegistryValueInteger(CONF_SERVER_TIMEOUT, server_timeout);
wchar_t server_timeout_string[1024];
Expand All @@ -1315,8 +1316,12 @@ HRESULT multiotp_request(_In_ std::wstring username,
}

if (readRegistryValueString(CONF_SHARED_SECRET, &shared_secret, L"ClientServerSecret") > 1) {
wcscat_s(options, 2048, L"\"");
wcscat_s(options, 2048, L"-server-secret=");
wcscat_s(options, 2048, shared_secret);
shared_secret_escaped = shared_secret;
replaceAll(shared_secret_escaped, L"\"", L"\\\"");
wcscat_s(options, 2048, shared_secret_escaped.c_str());
wcscat_s(options, 2048, L"\"");
wcscat_s(options, 2048, L" ");
}

Expand Down Expand Up @@ -1662,7 +1667,6 @@ std::wstring getCleanUsername(const std::wstring username, const std::wstring do
}
}


HRESULT hideCPField(__in ICredentialProviderCredential* self, __in ICredentialProviderCredentialEvents* pCPCE, __in DWORD fieldId)
{

Expand Down Expand Up @@ -1703,7 +1707,6 @@ HRESULT displayCPField(__in ICredentialProviderCredential* self, __in ICredentia
return hr;
}


int minutesSinceEpoch() {
std::time_t seconds = std::time(nullptr);
return seconds/60;
Expand Down Expand Up @@ -1773,6 +1776,7 @@ HRESULT multiotp_request_command(_In_ std::wstring command, _In_ std::wstring pa
DWORD server_cache_level = 1;
PWSTR shared_secret;
PWSTR servers;
std::wstring shared_secret_escaped;

server_timeout = readRegistryValueInteger(CONF_SERVER_TIMEOUT, server_timeout);
wchar_t server_timeout_string[1024];
Expand All @@ -1795,8 +1799,12 @@ HRESULT multiotp_request_command(_In_ std::wstring command, _In_ std::wstring pa
}

if (readRegistryValueString(CONF_SHARED_SECRET, &shared_secret, L"ClientServerSecret") > 1) {
wcscat_s(options, 2048, L"-server-secret=");
wcscat_s(options, 2048, shared_secret);
wcscat_s(options, 2048, L"\"");
wcscat_s(options, 2048, L"-server-secret=");
shared_secret_escaped = shared_secret;
replaceAll(shared_secret_escaped, L"\"", L"\\\"");
wcscat_s(options, 2048, shared_secret_escaped.c_str());
wcscat_s(options, 2048, L"\"");
wcscat_s(options, 2048, L" ");
}

Expand Down Expand Up @@ -1863,4 +1871,17 @@ HRESULT multiotp_request_command(_In_ std::wstring command, _In_ std::wstring pa
CoTaskMemFree(path);
}
return hr;
}

void replaceAll(std::wstring& str, const std::wstring& from, const std::wstring& to) {
if (from.empty())
return;
size_t start_pos = 0;
PrintLn(L"Looking for ", from.c_str());
PrintLn(L" IN ", str.c_str());
while ((start_pos = str.find(from, start_pos)) != std::string::npos) {
PrintLn(L"We found a ",from.c_str());
str.replace(start_pos, from.length(), to);
start_pos += to.length(); // In case 'to' contains 'from', like replacing 'x' with 'yx'
}
}
5 changes: 3 additions & 2 deletions CppClientCore/CppClientCore/MultiotpHelpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* Extra code provided "as is" for the multiOTP open source project
*
* @author Andre Liechti, SysCo systemes de communication sa, <[email protected]>
* @version 5.9.2.1
* @date 2022-08-10
* @version 5.9.3.1
* @date 2022-10-21
* @since 2013
* @copyright (c) 2016-2022 SysCo systemes de communication sa
* @copyright (c) 2015-2016 ArcadeJust ("RDP only" enhancement)
Expand Down Expand Up @@ -267,4 +267,5 @@ int minutesSinceEpoch();

HRESULT multiotp_request_command(_In_ std::wstring command, _In_ std::wstring params);

void replaceAll(std::wstring& str, const std::wstring& from, const std::wstring& to);
#endif
4 changes: 2 additions & 2 deletions CppClientCore/CppClientCore/MultiotpRegistry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
* multiOTP Credential Provider
*
* @author Andre Liechti, SysCo systemes de communication sa, <[email protected]>
* @version 5.9.2.1
* @date 2022-08-10
* @version 5.9.3.1
* @date 2022-10-21
* @since 2013
* @copyright (c) 2016-2022 SysCo systemes de communication sa
* @copyright (c) 2015-2016 ArcadeJust ("RDP only" enhancement)
Expand Down
4 changes: 2 additions & 2 deletions CppClientCore/CppClientCore/MultiotpRegistry.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
* multiOTP Credential Provider
*
* @author Andre Liechti, SysCo systemes de communication sa, <[email protected]>
* @version 5.9.2.1
* @date 2022-08-10
* @version 5.9.3.1
* @date 2022-10-21
* @since 2013
* @copyright (c) 2016-2022 SysCo systemes de communication sa
* @copyright (c) 2015-2016 ArcadeJust ("RDP only" enhancement)
Expand Down
Binary file modified CredentialProvider/CredentialProvider.rc
Binary file not shown.
Binary file modified CredentialProviderFilter/resources.aps
Binary file not shown.
8 changes: 4 additions & 4 deletions CredentialProviderFilter/resources.rc
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ END
//

VS_VERSION_INFO VERSIONINFO
FILEVERSION 5,9,2,1
PRODUCTVERSION 5,9,2,1
FILEVERSION 5,9,3,1
PRODUCTVERSION 5,9,3,1
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
Expand All @@ -71,12 +71,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "SysCo systemes de communication sa"
VALUE "FileDescription", "CredentialProviderFilter for the multiOTP CredentialProvider for Windows logon"
VALUE "FileVersion", "5.9.2.1"
VALUE "FileVersion", "5.9.3.1"
VALUE "InternalName", "multiOTPCredentialProviderFilter.dll"
VALUE "LegalCopyright", "Copyright (c) 2022 SysCo systemes de communication sa, 2019 NetKnights, 2016 Last Squirrel IT"
VALUE "OriginalFilename", "multiOTPCredentialProviderFilter.dll"
VALUE "ProductName", "multiOTPCredentialProvider"
VALUE "ProductVersion", "5.9.2.1"
VALUE "ProductVersion", "5.9.3.1"
END
END
BLOCK "VarFileInfo"
Expand Down
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ multiOTP Credential Provider for multiOTP is a free and open source implementati
(c) 2015-2016 ArcadeJust ("RDP only" enhancement)
(c) 2013-2015 Last Squirrel IT

Current build: 5.9.2.1 (2022-08-10)
Current build: 5.9.3.1 (2022-10-21)

The binary download page is available here : https://download.multiotp.net/credential-provider/ (download link are at the bottom of the page)

Expand Down Expand Up @@ -177,8 +177,12 @@ CHANGE LOG OF RELEASED VERSIONS
===============================
```
2022-08-09 5.9.2.1 ENH: Support without2FA user, unlock timeout without 2FA, autocomplete username with last connected
2022-06-17 5.9.1.0 ENH: Added FastUserSwitching inactivation during wizard (to fix unlock issue)
2022-10-21 5.9.3.1 FIX: Better special characters support in username and password
ENH: Accounts with Without2FA tokens can now also be stored in cache
2022-08-09 5.9.2.1 ENH: Support without2FA user, unlock timeout without 2FA
ENH: Users without 2FA tokens don't see the second screen during logon
ENH: Autocomplete username (with the last connected username)
2022-06-17 5.9.1.0 ENH: FastUserSwitching inactivation done during wizard (to fix unlock issue)
ENH: Last connected user available
2022-05-26 5.9.0.3 ENH: UPN and Lecagy cache handling when the domain controller is not reachable
ENH: Better UPN account handling when the domain controller is not reachable
Expand Down
6 changes: 6 additions & 0 deletions Shared/Shared.vcxproj.user
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ShowAllFiles>true</ShowAllFiles>
</PropertyGroup>
</Project>
Loading

0 comments on commit a8852ec

Please sign in to comment.