[wininet][3] Use a blank password if a NULL password is given
Paul Vriens
Paul.Vriens at xs4all.nl
Tue Jul 4 13:06:07 CDT 2006
Hi,
MSDN states that we should use a blank password when a NULL password is
given together with a NON-NULL username.
Ethereal confirms this :-)
Changelog
Use a blank password if a NULL password is given
Cheers,
Paul.
---
dlls/wininet/ftp.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/dlls/wininet/ftp.c b/dlls/wininet/ftp.c
index 5873ee8..32e21ab 100644
--- a/dlls/wininet/ftp.c
+++ b/dlls/wininet/ftp.c
@@ -1674,6 +1674,7 @@ HINTERNET FTP_Connect(LPWININETAPPINFOW
{
static const WCHAR szDefaultUsername[] = {'a','n','o','n','y','m','o','u','s','\0'};
static const WCHAR szDefaultPassword[] = {'u','s','e','r','@','s','e','r','v','e','r','\0'};
+ static const WCHAR szBlankPassword[] = {'\0'};
struct sockaddr_in socketAddr;
INT nsocket = -1;
UINT sock_namelen;
@@ -1733,7 +1734,10 @@ HINTERNET FTP_Connect(LPWININETAPPINFOW
}
else {
lpwfs->lpszUserName = WININET_strdupW(lpszUserName);
- lpwfs->lpszPassword = WININET_strdupW(lpszPassword);
+ if ( !lpszPassword)
+ lpwfs->lpszPassword = WININET_strdupW(szBlankPassword);
+ else
+ lpwfs->lpszPassword = WININET_strdupW(lpszPassword);
}
/* Don't send a handle created callback if this handle was created with InternetOpenUrl */
--
1.4.1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winehq.org/pipermail/wine-patches/attachments/20060704/592cc8f3/attachment.htm
More information about the wine-patches
mailing list