OrchardCMS / Orchard

Orchard is a free, open source, community-focused Content Management System built on the ASP.NET MVC platform.
https://orchardproject.net
BSD 3-Clause "New" or "Revised" License
2.38k stars 1.12k forks source link

Crash at log on when LastPasswordChangeUtc is null #8623

Closed AndreaPiovanelli closed 2 years ago

AndreaPiovanelli commented 2 years ago

https://github.com/OrchardCMS/Orchard/blob/023473857372383127f0e242d5800f2cd3c5f63a/src/Orchard.Web/Modules/Orchard.Users/Services/MembershipService.cs#L170

When someone tries to log in, if Custom Password Policy and Password Expire Policy are active, an exception could be thrown if LastPasswordChangeUtc is null (e.g. for the admin user).