bugs fix
This commit is contained in:
parent
f2c54df2b0
commit
41a540bd1e
13 changed files with 165 additions and 114 deletions
|
@ -25,12 +25,17 @@ namespace WebsitePanel.WebDav.Core.Security.Authentication
|
|||
|
||||
public WspPrincipal LogIn(string login, string password)
|
||||
{
|
||||
if (_principalContext.ValidateCredentials(login, password) == false)
|
||||
if (string.IsNullOrEmpty(login) || string.IsNullOrEmpty(password))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
//var user = UserPrincipal.FindByIdentity(_principalContext, IdentityType.UserPrincipalName, login);
|
||||
var user = UserPrincipal.FindByIdentity(_principalContext, IdentityType.UserPrincipalName, login);
|
||||
|
||||
if (_principalContext.ValidateCredentials(login, password) == false && user != null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
var principal = new WspPrincipal(login);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue