Skip to content

Commit b2e3fd1

Browse files
committed
Fix #63527: DCOM does not work with Username, Password parameter
We must not mix multibyte and wide character strings in the `COAUTHIDENTITY` structure. Using wide character strings throughout would have the advantage that the remote connection can be established regardless of the code page of the server, but that would more likely break BC, so we just drop the wide character string conversion of the username.
1 parent 2c57378 commit b2e3fd1

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

NEWS

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ PHP NEWS
1414

1515
- COM:
1616
. Fixed bug #63208 (BSTR to PHP string conversion not binary safe). (cmb)
17-
17+
. Fixed bug #63527 (DCOM does not work with Username, Password parameter).
18+
(cmb)
19+
1820
- Curl:
1921
. Fixed bug #79741 (curl_setopt CURLOPT_POSTFIELDS asserts on object with
2022
declared properties). (Nikita)

ext/com_dotnet/com_com.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ PHP_FUNCTION(com_create_instance)
133133
info.pwszName = php_com_string_to_olestring(server_name, server_name_len, obj->code_page);
134134

135135
if (user_name) {
136-
authid.User = php_com_string_to_olestring(user_name, -1, obj->code_page);
136+
authid.User = (OLECHAR*)user_name;
137137
authid.UserLength = (ULONG)user_name_len;
138138

139139
if (password) {

0 commit comments

Comments
 (0)