Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
03236a39
Commit
03236a39
authored
Sep 10, 2021
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Sep 10, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Add handling for remaining special errors to InternetErrorDlg.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
5e012f7b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
37 deletions
+51
-37
dialogs.c
dlls/wininet/dialogs.c
+46
-2
internet.c
dlls/wininet/tests/internet.c
+5
-35
No files found.
dlls/wininet/dialogs.c
View file @
03236a39
...
...
@@ -514,11 +514,17 @@ DWORD WINAPI InternetErrorDlg(HWND hWnd, HINTERNET hRequest,
}
break
;
}
case
ERROR_INTERNET_CLIENT_AUTH_CERT_NEEDED
:
if
(
!
req
)
return
ERROR_INVALID_PARAMETER
;
/* fall through */
case
ERROR_INTERNET_SEC_CERT_ERRORS
:
case
ERROR_INTERNET_SEC_CERT_CN_INVALID
:
case
ERROR_INTERNET_SEC_CERT_DATE_INVALID
:
case
ERROR_INTERNET_INVALID_CA
:
case
ERROR_INTERNET_SEC_CERT_REV_FAILED
:
case
ERROR_INTERNET_SEC_CERT_WEAK_SIGNATURE
:
if
(
dwFlags
&
FLAGS_ERROR_UI_FLAGS_NO_UI
)
{
res
=
ERROR_CANCELLED
;
break
;
...
...
@@ -530,13 +536,51 @@ DWORD WINAPI InternetErrorDlg(HWND hWnd, HINTERNET hRequest,
res
=
DialogBoxParamW
(
WININET_hModule
,
MAKEINTRESOURCEW
(
IDD_INVCERTDLG
),
hWnd
,
WININET_InvalidCertificateDialog
,
(
LPARAM
)
&
params
);
break
;
case
ERROR_HTTP_COOKIE_NEEDS_CONFIRMATION
:
if
(
dwFlags
&
FLAGS_ERROR_UI_FLAGS_NO_UI
)
{
res
=
ERROR_HTTP_COOKIE_DECLINED
;
break
;
}
FIXME
(
"Need to display dialog for error %d
\n
"
,
dwError
);
res
=
ERROR_CANCELLED
;
break
;
case
ERROR_INTERNET_INSERT_CDROM
:
if
(
!
req
)
return
ERROR_INVALID_PARAMETER
;
/* fall through */
case
ERROR_HTTP_REDIRECT_NEEDS_CONFIRMATION
:
case
ERROR_INTERNET_BAD_AUTO_PROXY_SCRIPT
:
case
ERROR_INTERNET_UNABLE_TO_DOWNLOAD_SCRIPT
:
case
ERROR_INTERNET_MIXED_SECURITY
:
case
ERROR_INTERNET_HTTPS_HTTP_SUBMIT_REDIR
:
if
(
!
(
dwFlags
&
FLAGS_ERROR_UI_FLAGS_NO_UI
))
FIXME
(
"Need to display dialog for error %d
\n
"
,
dwError
);
res
=
ERROR_CANCELLED
;
break
;
case
ERROR_INTERNET_HTTPS_TO_HTTP_ON_REDIR
:
case
ERROR_INTERNET_CHG_POST_IS_NON_SECURE
:
if
(
dwFlags
&
FLAGS_ERROR_UI_FLAGS_NO_UI
)
{
res
=
ERROR_SUCCESS
;
break
;
}
FIXME
(
"Need to display dialog for error %d
\n
"
,
dwError
);
res
=
ERROR_CANCELLED
;
break
;
case
ERROR_INTERNET_HTTP_TO_HTTPS_ON_REDIR
:
case
ERROR_INTERNET_POST_IS_NON_SECURE
:
FIXME
(
"Need to display dialog for error %d
\n
"
,
dwError
);
if
(
!
(
dwFlags
&
FLAGS_ERROR_UI_FLAGS_NO_UI
))
FIXME
(
"Need to display dialog for error %d
\n
"
,
dwError
);
res
=
ERROR_SUCCESS
;
break
;
default:
res
=
ERROR_CANCELLED
;
if
(
!
(
dwFlags
&
FLAGS_ERROR_UI_FILTER_FOR_ERRORS
))
res
=
ERROR_CANCELLED
;
break
;
}
if
(
req
)
...
...
dlls/wininet/tests/internet.c
View file @
03236a39
...
...
@@ -1566,29 +1566,14 @@ static void test_InternetErrorDlg(void)
break
;
}
todo_wine_if
(
i
==
ERROR_HTTP_COOKIE_NEEDS_CONFIRMATION
||
i
==
ERROR_INTERNET_HTTPS_TO_HTTP_ON_REDIR
||
i
==
ERROR_INTERNET_CHG_POST_IS_NON_SECURE
)
ok
(
res
==
expected
,
"Got %d, expected %d (%d)
\n
"
,
res
,
expected
,
i
);
ok
(
res
==
expected
,
"Got %d, expected %d (%d)
\n
"
,
res
,
expected
,
i
);
/* Same thing with NULL hwnd */
res
=
InternetErrorDlg
(
NULL
,
req
,
i
,
FLAGS_ERROR_UI_FLAGS_NO_UI
,
NULL
);
todo_wine_if
(
i
==
ERROR_HTTP_COOKIE_NEEDS_CONFIRMATION
||
i
==
ERROR_INTERNET_HTTPS_TO_HTTP_ON_REDIR
||
i
==
ERROR_INTERNET_CHG_POST_IS_NON_SECURE
)
ok
(
res
==
expected
,
"Got %d, expected %d (%d)
\n
"
,
res
,
expected
,
i
);
ok
(
res
==
expected
,
"Got %d, expected %d (%d)
\n
"
,
res
,
expected
,
i
);
res
=
InternetErrorDlg
(
NULL
,
req
,
i
,
FLAGS_ERROR_UI_FILTER_FOR_ERRORS
|
FLAGS_ERROR_UI_FLAGS_NO_UI
,
NULL
);
todo_wine_if
(
i
!=
ERROR_INTERNET_INCORRECT_PASSWORD
&&
i
!=
ERROR_INTERNET_SEC_CERT_DATE_INVALID
&&
i
!=
ERROR_INTERNET_SEC_CERT_CN_INVALID
&&
i
!=
ERROR_INTERNET_INVALID_CA
&&
i
!=
ERROR_INTERNET_SEC_CERT_ERRORS
&&
i
!=
ERROR_INTERNET_SEC_CERT_REV_FAILED
&&
i
!=
ERROR_INTERNET_HTTP_TO_HTTPS_ON_REDIR
&&
i
!=
ERROR_INTERNET_POST_IS_NON_SECURE
&&
i
!=
ERROR_INTERNET_MIXED_SECURITY
&&
i
!=
ERROR_INTERNET_POST_IS_NON_SECURE
&&
i
!=
ERROR_INTERNET_CLIENT_AUTH_CERT_NEEDED
&&
i
!=
ERROR_INTERNET_HTTPS_HTTP_SUBMIT_REDIR
&&
i
!=
ERROR_INTERNET_INSERT_CDROM
&&
i
!=
ERROR_INTERNET_SEC_CERT_WEAK_SIGNATURE
&&
i
!=
ERROR_INTERNET_BAD_AUTO_PROXY_SCRIPT
&&
i
!=
ERROR_INTERNET_UNABLE_TO_DOWNLOAD_SCRIPT
&&
i
!=
ERROR_HTTP_REDIRECT_NEEDS_CONFIRMATION
)
ok
(
res
==
expected2
,
"Got %d, expected %d (%d)
\n
"
,
res
,
expected2
,
i
);
ok
(
res
==
expected2
,
"Got %d, expected %d (%d)
\n
"
,
res
,
expected2
,
i
);
/* With a null req */
if
(
test_flags
&
FLAG_NEEDREQ
)
...
...
@@ -1598,31 +1583,16 @@ static void test_InternetErrorDlg(void)
}
res
=
InternetErrorDlg
(
hwnd
,
NULL
,
i
,
FLAGS_ERROR_UI_FLAGS_NO_UI
,
NULL
);
todo_wine_if
(
i
==
ERROR_HTTP_COOKIE_NEEDS_CONFIRMATION
||
i
==
ERROR_INTERNET_INSERT_CDROM
||
i
==
ERROR_INTERNET_CLIENT_AUTH_CERT_NEEDED
||
i
==
ERROR_INTERNET_HTTPS_TO_HTTP_ON_REDIR
||
i
==
ERROR_INTERNET_CHG_POST_IS_NON_SECURE
)
ok
(
res
==
expected
,
"Got %d, expected %d (%d)
\n
"
,
res
,
expected
,
i
);
ok
(
res
==
expected
,
"Got %d, expected %d (%d)
\n
"
,
res
,
expected
,
i
);
res
=
InternetErrorDlg
(
NULL
,
NULL
,
i
,
FLAGS_ERROR_UI_FILTER_FOR_ERRORS
|
FLAGS_ERROR_UI_FLAGS_NO_UI
,
NULL
);
todo_wine_if
(
i
!=
ERROR_INTERNET_SEC_CERT_DATE_INVALID
&&
i
!=
ERROR_INTERNET_HTTP_TO_HTTPS_ON_REDIR
&&
i
!=
ERROR_INTERNET_SEC_CERT_CN_INVALID
&&
i
!=
ERROR_INTERNET_INVALID_CA
&&
i
!=
ERROR_INTERNET_SEC_CERT_ERRORS
&&
i
!=
ERROR_INTERNET_SEC_CERT_REV_FAILED
&&
i
!=
ERROR_INTERNET_MIXED_SECURITY
&&
i
!=
ERROR_INTERNET_POST_IS_NON_SECURE
&&
i
!=
ERROR_INTERNET_HTTPS_HTTP_SUBMIT_REDIR
&&
i
!=
ERROR_INTERNET_INCORRECT_PASSWORD
&&
i
!=
ERROR_INTERNET_SEC_CERT_WEAK_SIGNATURE
&&
i
!=
ERROR_INTERNET_BAD_AUTO_PROXY_SCRIPT
&&
i
!=
ERROR_INTERNET_UNABLE_TO_DOWNLOAD_SCRIPT
&&
i
!=
ERROR_HTTP_REDIRECT_NEEDS_CONFIRMATION
)
ok
(
res
==
expected2
,
"Got %d, expected %d (%d)
\n
"
,
res
,
expected2
,
i
);
ok
(
res
==
expected2
,
"Got %d, expected %d (%d)
\n
"
,
res
,
expected2
,
i
);
}
res
=
InternetErrorDlg
(
NULL
,
req
,
0xdeadbeef
,
FLAGS_ERROR_UI_FILTER_FOR_ERRORS
|
FLAGS_ERROR_UI_FLAGS_NO_UI
,
NULL
);
todo_wine
ok
(
res
==
ERROR_SUCCESS
,
"Got %d, expected ERROR_SUCCESS
\n
"
,
res
);
res
=
InternetErrorDlg
(
NULL
,
NULL
,
0xdeadbeef
,
FLAGS_ERROR_UI_FILTER_FOR_ERRORS
|
FLAGS_ERROR_UI_FLAGS_NO_UI
,
NULL
);
todo_wine
ok
(
res
==
ERROR_SUCCESS
,
"Got %d, expected ERROR_SUCCESS
\n
"
,
res
);
res
=
InternetCloseHandle
(
req
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment