Alexandre Julliard : wininet/tests: Anonymous FTP can succeed without a password.
Alexandre Julliard
julliard at winehq.org
Fri Sep 14 10:16:01 CDT 2007
Module: wine
Branch: master
Commit: b20694e732156d5677d3f5855363ce9997218eb2
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b20694e732156d5677d3f5855363ce9997218eb2
Author: Alexandre Julliard <julliard at winehq.org>
Date: Fri Sep 14 16:59:06 2007 +0200
wininet/tests: Anonymous FTP can succeed without a password.
---
dlls/wininet/tests/ftp.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/dlls/wininet/tests/ftp.c b/dlls/wininet/tests/ftp.c
index 11984da..6d27cb1 100644
--- a/dlls/wininet/tests/ftp.c
+++ b/dlls/wininet/tests/ftp.c
@@ -77,9 +77,14 @@ static void test_connect(void)
SetLastError(0xdeadbeef);
hFtp = InternetConnect(hInternet, "ftp.winehq.org", INTERNET_DEFAULT_FTP_PORT, "anonymous", NULL, INTERNET_SERVICE_FTP, 0, 0);
- ok ( hFtp == NULL, "Expected InternetConnect to fail\n");
- ok ( GetLastError() == ERROR_INTERNET_LOGIN_FAILURE,
- "Expected ERROR_INTERNET_LOGIN_FAILURE, got %d\n", GetLastError());
+ if (hFtp) /* some servers accept an empty password */
+ {
+ ok ( GetLastError() == ERROR_SUCCESS, "ERROR_SUCCESS, got %d\n", GetLastError());
+ InternetCloseHandle(hFtp);
+ }
+ else
+ ok ( GetLastError() == ERROR_INTERNET_LOGIN_FAILURE,
+ "Expected ERROR_INTERNET_LOGIN_FAILURE, got %d\n", GetLastError());
SetLastError(0xdeadbeef);
hFtp = InternetConnect(hInternet, "ftp.winehq.org", INTERNET_DEFAULT_FTP_PORT, NULL, "IEUser@", INTERNET_SERVICE_FTP, 0, 0);
More information about the wine-cvs
mailing list