poppastring / dasblog-core

The original DasBlog reimagined with ASP.NET Core
MIT License
473 stars 195 forks source link

Unable to change password #496

Closed Tdue21 closed 3 years ago

Tdue21 commented 3 years ago

I am trying to set up a blog on a free azure app service, and has it up and running. However, when I try to set a new password, it fails, somehow. I get no warning or error when I go to /user and change the email and other values. I delete the Open ID url, because I don't have one of those. Then I enter the desired password. Outwardly nothing happens, except the password field is blanked when I press Save.

I logout and then try to log in with the desired email and password, and now I get an error:

The username and/or password is incorrect. Please try again.

Help?

poppastring commented 3 years ago

@Tdue21 I am sorry to hear about this I will test this out locally and get back to you. In the meantime I am curious if a restart was required for the new password to take impact?

Tdue21 commented 3 years ago

I have no idea. Now the thing refuses to start up ...

I have tried to run it locally as well, with the same result. I can apparently change the password, but it doesn't validate when used. I am not too well versed in the web technologies used, so it is a bit of a learning curve for me to debug.

Tdue21 commented 3 years ago

Hmm.. Now it works. I copied siteSecurity.Development.config to siteSecurity.Production.config and changed the email address, but left the password. Then I started the application up with .\DasBlog.Web.exe. Went to login with my email and the default password. Which worked fine. I went to user settings and changed password. Logged out and tried to login. It failed. Stopped the application, and checked the siteSecurity.Production.config. The stored password hash had changed. Started the application and now I am able to log in with my new password.

So, it seems to be a matter of the password not being stored properly in memory.

On my Azure host though, nothing works. I have set it up as a free Linux based thingy. I think I did it correctly by setting the Startup Command under Settings -> Configuration:

image

But all I get when I go to the site address is: The service is unavailable.

poppastring commented 3 years ago

HI @Tdue21

Have setup up your ASP.NET Core environment variable? image

poppastring commented 3 years ago

It looks like changing passwords requires a restart... I will start a PR to resolve this.