Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
e767cc81
Commit
e767cc81
authored
Sep 18, 2010
by
Thomas Mullaly
Committed by
Alexandre Julliard
Sep 20, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: File URIs can't have a userinfo component when creating an IUri using IUriBuilder.
parent
f2a1737e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
0 deletions
+30
-0
uri.c
dlls/urlmon/tests/uri.c
+20
-0
uri.c
dlls/urlmon/uri.c
+10
-0
No files found.
dlls/urlmon/tests/uri.c
View file @
e767cc81
...
...
@@ -5104,6 +5104,26 @@ static const uri_builder_test uri_builder_tests[] = {
0
,
INET_E_INVALID_URL
,
FALSE
,
0
,
INET_E_INVALID_URL
,
FALSE
,
0
,
0
,
0
,
INET_E_INVALID_URL
,
FALSE
},
/* File scheme's can't have a username set. */
{
"file://google.com/"
,
0
,
S_OK
,
FALSE
,
{
{
TRUE
,
"username"
,
NULL
,
Uri_PROPERTY_USER_NAME
,
S_OK
,
FALSE
}
},
{
FALSE
},
0
,
INET_E_INVALID_URL
,
FALSE
,
0
,
INET_E_INVALID_URL
,
FALSE
,
0
,
0
,
0
,
INET_E_INVALID_URL
,
FALSE
},
/* File schemes can't have a password set. */
{
"file://google.com/"
,
0
,
S_OK
,
FALSE
,
{
{
TRUE
,
"password"
,
NULL
,
Uri_PROPERTY_PASSWORD
,
S_OK
,
FALSE
}
},
{
FALSE
},
0
,
INET_E_INVALID_URL
,
FALSE
,
0
,
INET_E_INVALID_URL
,
FALSE
,
0
,
0
,
0
,
INET_E_INVALID_URL
,
FALSE
}
};
...
...
dlls/urlmon/uri.c
View file @
e767cc81
...
...
@@ -3452,6 +3452,16 @@ static HRESULT validate_components(const UriBuilder *builder, parse_data *data,
if
(
FAILED
(
hr
))
return
hr
;
/* Extra validation for file schemes. */
if
(
data
->
scheme_type
==
URL_SCHEME_FILE
)
{
if
((
builder
->
password
||
(
builder
->
uri
&&
builder
->
uri
->
userinfo_split
>
-
1
))
||
(
builder
->
username
||
(
builder
->
uri
&&
builder
->
uri
->
userinfo_start
>
-
1
)))
{
TRACE
(
"(%p %p %x): File schemes can't contain a username or password.
\n
"
,
builder
,
data
,
flags
);
return
INET_E_INVALID_URL
;
}
}
return
E_NOTIMPL
;
}
...
...
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