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

abpAccountWebModule, checkPassword method why not need authorize #2287

Closed
cqgis opened this issue Dec 1, 2019 · 1 comment · Fixed by #2293
Closed

abpAccountWebModule, checkPassword method why not need authorize #2287

cqgis opened this issue Dec 1, 2019 · 1 comment · Fixed by #2293
Assignees

Comments

@cqgis
Copy link

cqgis commented Dec 1, 2019

checkPassword method why not need authorize? is it not safe?

  [RemoteService]
    [Controller]
    [ControllerName("Login")]
    [Area("Account")]
    [Route("api/account")]
    public class AccountController : AbpController
    {
   ...
        [HttpPost]
        [Route("checkPassword")]
        public virtual async Task<AbpLoginResult> CheckPassword(UserLoginInfo login)
        {
            ValidateLoginInfo(login);
            var identityUser = await _userManager.FindByNameAsync(login.UserNameOrEmailAddress);

            if (identityUser == null)
            {
                return new AbpLoginResult(LoginResultType.InvalidUserNameOrPassword);
            }

            return GetAbpLoginResult(await _signInManager.CheckPasswordSignInAsync(identityUser, login.Password, true));
        }
...
}
@maliming maliming self-assigned this Dec 1, 2019
@maliming
Copy link
Member

maliming commented Dec 1, 2019

It is similar to the Login method, no authorize is required, but I found that it should call ReplaceEmailToUsernameOfInputIfNeeds

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

Successfully merging a pull request may close this issue.

3 participants