crypt32: Don't get confused matching URLs with a colon in the userinfo portion (e.g. user:password@domain).

This commit is contained in:
Juan Lang 2009-12-18 10:34:25 -08:00 committed by Alexandre Julliard
parent 79a2045395
commit 4e18ac601f
1 changed files with 6 additions and 2 deletions

View File

@ -686,8 +686,12 @@ static BOOL url_matches(LPCWSTR constraint, LPCWSTR name,
authority_end = strchrW(name, '?');
if (!authority_end)
authority_end = name + strlenW(name);
/* Remove any port number from the authority */
for (colon = authority_end; colon >= name && *colon != ':'; colon--)
/* Remove any port number from the authority. The userinfo portion
* 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 == ':')
authority_end = colon;