Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open Live Writer Login Seems Broken #57

Open
darenm opened this issue Mar 16, 2018 · 2 comments
Open

Open Live Writer Login Seems Broken #57

darenm opened this issue Mar 16, 2018 · 2 comments

Comments

@darenm
Copy link

darenm commented Mar 16, 2018

A refactor of MetaWeblogService appears to have broken the WLS login:

        private void ValidateUser(string username, string password)
        {
            if (_userServices.ValidateUser(username, password))
            {
                throw new MetaWeblogException("Unauthorized");
            }

            var identity = new ClaimsIdentity(CookieAuthenticationDefaults.AuthenticationScheme);
            identity.AddClaim(new Claim(ClaimTypes.Name, username));

            _context.HttpContext.User = new ClaimsPrincipal(identity);
        }

As you can probably see, a successful user validation results in an exception, whereas a failure provides access...

@dyardyGIT
Copy link
Contributor

Modify the above code like following - so that if false it throws exception. Pull request created.
_userServices.ValidateUser(username, password)==false

@braegelno5
Copy link
Contributor

the actual code is working with live writer again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants