mirror of
https://github.com/moparisthebest/keepass2android
synced 2024-11-22 09:12:17 -05:00
Support for WebDav with domain users
This commit is contained in:
parent
deeaa673a5
commit
43ea197fd5
@ -193,7 +193,20 @@ namespace KeePassLib.Serialization
|
||||
if ((ioc.UserName.Length > 0) || (ioc.Password.Length > 0))
|
||||
{
|
||||
//set the credentials without a cache (in case the cache below fails:
|
||||
wc.Credentials = new NetworkCredential(ioc.UserName, ioc.Password);
|
||||
|
||||
//check for backslash to determine whether we need to specify the domain:
|
||||
int backslashPos = ioc.UserName.IndexOf("\\", StringComparison.Ordinal);
|
||||
if (backslashPos > 0)
|
||||
{
|
||||
string domain = ioc.UserName.Substring(0, backslashPos);
|
||||
string user = ioc.UserName.Substring(backslashPos + 1);
|
||||
wc.Credentials = new NetworkCredential(user, ioc.Password, domain);
|
||||
}
|
||||
else
|
||||
{
|
||||
wc.Credentials = new NetworkCredential(ioc.UserName, ioc.Password);
|
||||
}
|
||||
|
||||
|
||||
if (digestAuth)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user