mirror of
https://github.com/wismna/ModernKeePassLib.git
synced 2025-10-03 15:40:20 -04:00
Update to KeePassLib version 2.45
This commit is contained in:
@@ -273,6 +273,7 @@ namespace ModernKeePassLib.Serialization
|
||||
public static readonly string WrhMoveFileTo = "MoveFileTo";
|
||||
|
||||
public static event EventHandler<IOAccessEventArgs> IOAccessPre;
|
||||
public static event EventHandler<IOWebRequestEventArgs> IOWebRequestPre;
|
||||
|
||||
#if !ModernKeePassLib && !KeePassLibSD
|
||||
// Allow self-signed certificates, expired certificates, etc.
|
||||
@@ -369,6 +370,13 @@ namespace ModernKeePassLib.Serialization
|
||||
bool? ob = p.GetBool(IocKnownProperties.PreAuth);
|
||||
if(ob.HasValue) request.PreAuthenticate = ob.Value;
|
||||
#endif
|
||||
|
||||
if(IOConnection.IOWebRequestPre != null)
|
||||
{
|
||||
IOWebRequestEventArgs e = new IOWebRequestEventArgs(request,
|
||||
((ioc != null) ? ioc.CloneDeep() : null));
|
||||
IOConnection.IOWebRequestPre(null, e);
|
||||
}
|
||||
}
|
||||
|
||||
internal static void ConfigureWebClient(WebClient wc)
|
||||
@@ -549,13 +557,13 @@ namespace ModernKeePassLib.Serialization
|
||||
PrepareWebAccess(ioc);
|
||||
|
||||
IOWebClient wc = new IOWebClient(ioc);
|
||||
ConfigureWebClient(wc);
|
||||
|
||||
if((ioc.UserName.Length > 0) || (ioc.Password.Length > 0))
|
||||
wc.Credentials = new NetworkCredential(ioc.UserName, ioc.Password);
|
||||
else if(NativeLib.IsUnix()) // Mono requires credentials
|
||||
else if(MonoWorkarounds.IsRequired(688007))
|
||||
wc.Credentials = new NetworkCredential("anonymous", string.Empty);
|
||||
|
||||
ConfigureWebClient(wc);
|
||||
return wc;
|
||||
}
|
||||
|
||||
@@ -564,13 +572,13 @@ namespace ModernKeePassLib.Serialization
|
||||
PrepareWebAccess(ioc);
|
||||
|
||||
WebRequest req = WebRequest.Create(ioc.Path);
|
||||
ConfigureWebRequest(req, ioc);
|
||||
|
||||
if((ioc.UserName.Length > 0) || (ioc.Password.Length > 0))
|
||||
req.Credentials = new NetworkCredential(ioc.UserName, ioc.Password);
|
||||
else if(NativeLib.IsUnix()) // Mono requires credentials
|
||||
else if(MonoWorkarounds.IsRequired(688007))
|
||||
req.Credentials = new NetworkCredential("anonymous", string.Empty);
|
||||
|
||||
ConfigureWebRequest(req, ioc);
|
||||
return req;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user