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
0b9b73d6
Commit
0b9b73d6
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 ports to contain any characters in UrlGetPart().
Signed-off-by:
Zebediah Figura
<
zfigura@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
4ff109c3
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
16 deletions
+6
-16
path.c
dlls/kernelbase/path.c
+3
-13
url.c
dlls/shlwapi/tests/url.c
+3
-3
No files found.
dlls/kernelbase/path.c
View file @
0b9b73d6
...
...
@@ -77,7 +77,6 @@ struct parsed_url
enum
url_scan_type
{
SCHEME
,
PORT
,
USERPASS
,
};
...
...
@@ -4212,14 +4211,6 @@ static const WCHAR * scan_url(const WCHAR *start, DWORD *size, enum url_scan_typ
}
break
;
case
PORT
:
while
(
*
start
>=
'0'
&&
*
start
<=
'9'
)
{
start
++
;
(
*
size
)
++
;
}
break
;
default:
FIXME
(
"unknown type %d
\n
"
,
type
);
return
L""
;
...
...
@@ -4286,10 +4277,9 @@ static LONG parse_url(const WCHAR *url, struct parsed_url *pl)
if
(
*
work
==
':'
)
{
/* parse port */
work
++
;
pl
->
port
=
work
;
work
=
scan_url
(
pl
->
port
,
&
pl
->
port_len
,
PORT
);
pl
->
port
=
work
+
1
;
work
=
parse_url_element
(
pl
->
port
,
L"/
\\
?#"
);
pl
->
port_len
=
work
-
pl
->
port
;
}
if
(
*
work
==
'/'
)
{
...
...
dlls/shlwapi/tests/url.c
View file @
0b9b73d6
...
...
@@ -630,7 +630,7 @@ static void test_UrlGetPart(void)
{
"http://localhost:port/"
,
URL_PART_USERNAME
,
0
,
E_INVALIDARG
,
.
todo_hr
=
TRUE
},
{
"http://localhost:port/"
,
URL_PART_PASSWORD
,
0
,
E_INVALIDARG
,
.
todo_hr
=
TRUE
},
{
"http://localhost:port/"
,
URL_PART_HOSTNAME
,
0
,
S_OK
,
"localhost"
},
{
"http://localhost:port/"
,
URL_PART_PORT
,
0
,
S_OK
,
"port"
,
.
todo_hr
=
TRUE
},
{
"http://localhost:port/"
,
URL_PART_PORT
,
0
,
S_OK
,
"port"
},
{
"http://:"
,
URL_PART_HOSTNAME
,
0
,
S_FALSE
,
""
},
{
"http://:"
,
URL_PART_PORT
,
0
,
S_FALSE
,
""
},
...
...
@@ -651,7 +651,7 @@ static void test_UrlGetPart(void)
{
"http://:@"
,
URL_PART_HOSTNAME
,
0
,
S_FALSE
,
""
},
{
"http://host:port:q"
,
URL_PART_HOSTNAME
,
0
,
S_OK
,
"host"
},
{
"http://host:port:q"
,
URL_PART_PORT
,
0
,
S_OK
,
"port:q"
,
.
todo_hr
=
TRUE
},
{
"http://host:port:q"
,
URL_PART_PORT
,
0
,
S_OK
,
"port:q"
},
{
"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"
},
...
...
@@ -678,7 +678,7 @@ static void test_UrlGetPart(void)
{
"http:// !
\"
$%&'()*+,-.;<=>[]^_`{|~}
\x01\x7f\xff
:pass@host"
,
URL_PART_USERNAME
,
0
,
S_OK
,
" !
\"
$%&'()*+,-.;<=>[]^_`{|~}
\x01\x7f\xff
"
,
.
todo_hr
=
TRUE
},
{
"http://user: !
\"
$%&'()*+,-.;<=>[]^_`{|~}
\x01\x7f\xff
@host"
,
URL_PART_PASSWORD
,
0
,
S_OK
,
" !
\"
$%&'()*+,-.;<=>[]^_`{|~}
\x01\x7f\xff
"
,
.
todo_hr
=
TRUE
},
{
"http:// !
\"
$%&'()*+,-.;<=>[]^_`{|~}
\x01\x7f\xff
"
,
URL_PART_HOSTNAME
,
0
,
S_OK
,
" !
\"
$%&'()*+,-.;<=>[]^_`{|~}
\x01\x7f\xff
"
,
.
todo_hr
=
TRUE
},
{
"http://host: !
\"
$%&'()*+,-.;<=>[]^_`{|~}
\x01\x7f\xff
"
,
URL_PART_PORT
,
0
,
S_OK
,
" !
\"
$%&'()*+,-.;<=>[]^_`{|~}
\x01\x7f\xff
"
,
.
todo_hr
=
TRUE
},
{
"http://host: !
\"
$%&'()*+,-.;<=>[]^_`{|~}
\x01\x7f\xff
"
,
URL_PART_PORT
,
0
,
S_OK
,
" !
\"
$%&'()*+,-.;<=>[]^_`{|~}
\x01\x7f\xff
"
},
{
"http:///index.html"
,
URL_PART_HOSTNAME
,
0
,
S_FALSE
,
""
},
{
"http:///index.html"
,
URL_PART_HOSTNAME
,
URL_PARTFLAG_KEEPSCHEME
,
S_OK
,
"http:"
,
.
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