C++ Fix unicode conversion for an Active Directory password filter
$100-300 USD
Cancelled
Posted over 12 years ago
$100-300 USD
Paid on delivery
We have a C++ DLL that plugs into Active Directory as a password filter. The project files are for Visual Studio 2010.
How these filters work is explained here:
* [login to view URL]
* [login to view URL](VS.85).aspx
When a password-change is detected (when ActiveDirectory calls the passwordChangeNotify function is called in our DLL), the password filter calls a COM-component, which sends on the password-change event to other systems.
This all works as advertised, except for one thing;
For both the username and password, several non-standard characters are added to the string. I'm pretty sure that this is caused by a buffer-overrun when the strings are converted from a unicode string (PUNICODE) to a BSTR.
I'm not a C++ programmer (I do C# usually) and am unable to fix the problem myself.
To test your password DLL, I have setup a Windows Server 2003 server and Windows Server 2008 server, on which you can deploy and test the DLL.
This is an easy, but urgent project. If you manage to solve the problem within 24 hours, expect a top rating and a bonus.
The source code is attached. The problematic code is in PasswordFilter.cpp.
Look for these functions;
* INLINE BSTR PUNICODEToBSTR(PUNICODE_STRING pStr)
* NTSTATUS STDCALL PasswordChangeNotify(PUNICODE_STRING User, ULONG RelativeId, PUNICODE_STRING Password)