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
4ff109c3
Commit
4ff109c3
authored
Feb 14, 2022
by
Zebediah Figura
Committed by
Alexandre Julliard
Feb 15, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernelbase: Allow hostnames to contain any characters in UrlGetPart().
Signed-off-by:
Zebediah Figura
<
zfigura@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ef64aea7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
14 deletions
+14
-14
path.c
dlls/kernelbase/path.c
+13
-13
url.c
dlls/shlwapi/tests/url.c
+1
-1
No files found.
dlls/kernelbase/path.c
View file @
4ff109c3
...
...
@@ -77,7 +77,6 @@ struct parsed_url
enum
url_scan_type
{
SCHEME
,
HOST
,
PORT
,
USERPASS
,
};
...
...
@@ -4221,14 +4220,6 @@ static const WCHAR * scan_url(const WCHAR *start, DWORD *size, enum url_scan_typ
}
break
;
case
HOST
:
while
(
isalnum
(
*
start
)
||
*
start
==
'-'
||
*
start
==
'.'
||
*
start
==
' '
||
*
start
==
'*'
)
{
start
++
;
(
*
size
)
++
;
}
break
;
default:
FIXME
(
"unknown type %d
\n
"
,
type
);
return
L""
;
...
...
@@ -4237,6 +4228,15 @@ static const WCHAR * scan_url(const WCHAR *start, DWORD *size, enum url_scan_typ
return
start
;
}
static
const
WCHAR
*
parse_url_element
(
const
WCHAR
*
url
,
const
WCHAR
*
separators
)
{
const
WCHAR
*
p
;
if
((
p
=
wcspbrk
(
url
,
separators
)))
return
p
;
return
url
+
wcslen
(
url
);
}
static
LONG
parse_url
(
const
WCHAR
*
url
,
struct
parsed_url
*
pl
)
{
const
WCHAR
*
work
;
...
...
@@ -4280,10 +4280,10 @@ static LONG parse_url(const WCHAR *url, struct parsed_url *pl)
}
else
goto
ErrorExit
;
/* now start parsing hostname or hostnumber */
work
++
;
pl
->
hostname
=
work
;
work
=
scan_url
(
pl
->
hostname
,
&
pl
->
hostname_len
,
HOST
);
pl
->
hostname
=
work
+
1
;
work
=
parse_url_element
(
pl
->
hostname
,
L":/
\\
?#"
)
;
pl
->
hostname
_len
=
work
-
pl
->
hostname
;
if
(
*
work
==
':'
)
{
/* parse port */
...
...
dlls/shlwapi/tests/url.c
View file @
4ff109c3
...
...
@@ -655,7 +655,7 @@ static void test_UrlGetPart(void)
{
"http://user:pass:q@host"
,
URL_PART_USERNAME
,
0
,
S_OK
,
"user"
,
.
todo_hr
=
TRUE
},
{
"http://user:pass:q@host"
,
URL_PART_PASSWORD
,
0
,
S_OK
,
"pass:q"
,
.
todo_hr
=
TRUE
},
{
"http://user@host@q"
,
URL_PART_USERNAME
,
0
,
S_OK
,
"user"
},
{
"http://user@host@q"
,
URL_PART_HOSTNAME
,
0
,
S_OK
,
"host@q"
,
.
todo_result
=
TRUE
},
{
"http://user@host@q"
,
URL_PART_HOSTNAME
,
0
,
S_OK
,
"host@q"
},
{
"http:localhost/index.html"
,
URL_PART_HOSTNAME
,
0
,
E_FAIL
,
.
todo_hr
=
TRUE
},
{
"http:/localhost/index.html"
,
URL_PART_HOSTNAME
,
0
,
E_FAIL
,
.
todo_hr
=
TRUE
},
...
...
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