Commit 4e18ac60 authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

crypt32: Don't get confused matching URLs with a colon in the userinfo portion…

crypt32: Don't get confused matching URLs with a colon in the userinfo portion (e.g. user:password@domain).
parent 79a20453
...@@ -686,8 +686,12 @@ static BOOL url_matches(LPCWSTR constraint, LPCWSTR name, ...@@ -686,8 +686,12 @@ static BOOL url_matches(LPCWSTR constraint, LPCWSTR name,
authority_end = strchrW(name, '?'); authority_end = strchrW(name, '?');
if (!authority_end) if (!authority_end)
authority_end = name + strlenW(name); authority_end = name + strlenW(name);
/* Remove any port number from the authority */ /* Remove any port number from the authority. The userinfo portion
for (colon = authority_end; colon >= name && *colon != ':'; colon--) * of an authority may contain a colon, so stop if a userinfo portion
* is found (indicated by '@').
*/
for (colon = authority_end; colon >= name && *colon != ':' &&
*colon != '@'; colon--)
; ;
if (*colon == ':') if (*colon == ':')
authority_end = colon; authority_end = colon;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment