Module: wine Branch: master Commit: 4e18ac601f9ea1adebc1c2d36af6d75054e0ca6d URL: http://source.winehq.org/git/wine.git/?a=commit;h=4e18ac601f9ea1adebc1c2d36a...
Author: Juan Lang juan.lang@gmail.com Date: Fri Dec 18 10:34:25 2009 -0800
crypt32: Don't get confused matching URLs with a colon in the userinfo portion (e.g. user:password@domain).
---
dlls/crypt32/chain.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/dlls/crypt32/chain.c b/dlls/crypt32/chain.c index 28a2206..b2160f3 100644 --- a/dlls/crypt32/chain.c +++ b/dlls/crypt32/chain.c @@ -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;