El 11/05/15 a les 15:03, Jarto Tarpio ha escrit: > > Maybe the biggest question is the one breaking backwards compatibility: > Changing a Unicode pwd. With current synapse code one has to make sure > to encode the string already as pure Unicode and add the quotes. > However, synapse itself removes the quotes usually from attribute > values. This has worked by accident earlier as the last char of the new > password is #0. I’d prefer changing the code so, that the new password > is sent without quotes and LdapSend itself handles the special case > encoding the password as AD wants it to be encoded.
Just FYI, with fpc 2.6.4 (string=ansistring) I use this function: function Utf16Le(const s:WideString):string; var i: Integer; w: word; begin result:=''; for i:=1 to length(s) do begin w:=ord(s[i]); result:=result+chr(lo(w))+chr(hi(w)); end; end; and then with alist.add do begin AttributeName:='unicodePwd'; Add(QuoteStr(Utf16Le('"'+passwd+'"'),'"')); end; (where alist is a TLDAPAttributeList, the QuoteStr is necessary because synapse unquotes it). Bye -- Luca ------------------------------------------------------------------------------ One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y _______________________________________________ synalist-public mailing list synalist-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synalist-public