Re: [PATCH v2 2/2] wincred: improve compatibility with windows versions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jan 10, 2013 at 1:10 PM, Karsten Blees <karsten.blees@xxxxxxxxx> wrote:
>  static int match_cred(const CREDENTIALW *cred)
>  {
> -       return (!wusername || !wcscmp(wusername, cred->UserName)) &&
> -           match_attr(cred, L"git_protocol", protocol) &&
> -           match_attr(cred, L"git_host", host) &&
> -           match_attr(cred, L"git_path", path);
> +       LPCWSTR target = cred->TargetName;
> +       if (wusername && wcscmp(wusername, cred->UserName))
> +               return 0;
> +
> +       return match_part(&target, L"git", L":") &&
> +               match_part(&target, protocol, L"://") &&
> +               match_part(&target, wusername, L"@") &&

This seems to have broken credentials with '@' in the username, which
isn't all that unusual these days... :(
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]