dotnet / AspNetCore.Docs

Documentation for ASP.NET Core
https://docs.microsoft.com/aspnet/core
Creative Commons Attribution 4.0 International
12.6k stars 25.3k forks source link

Asp.Net Core 7 - PasswordHasherOptions.IterationCount wrong default value #30775

Open pampua84 opened 1 year ago

pampua84 commented 1 year ago

Description

As mentioned in the title, on the documentation the default number of iterations is 100_000 but in reality it is 10_000. I believe the current value (100_000 )is for .Net 8 and not 7 and earlier.

Page URL

https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.identity.passwordhasheroptions.iterationcount?view=aspnetcore-7.0&source=docs#microsoft-aspnetcore-identity-passwordhasheroptions-iterationcount

Content source URL

https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.identity.passwordhasheroptions.iterationcount?view=aspnetcore-7.0&source=docs#microsoft-aspnetcore-identity-passwordhasheroptions-iterationcount

Document ID

ebb299e0-6c1c-7077-689d-ac711352e418

Article author

Rick-Anderson

guardrex commented 1 year ago

Something seems funky here, but not for 7.0. At 7.0, the default is 100,000 ...

https://github.com/dotnet/aspnetcore/blob/release/7.0/src/Identity/Extensions.Core/src/PasswordHasherOptions.cs#L33

At 6.0 is when it was 10,000 ...

https://github.com/dotnet/aspnetcore/blob/release/6.0/src/Identity/Extensions.Core/src/PasswordHasherOptions.cs#L33

... but if you select the 6.0 API doc, it still indicates 100,000 ...

https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.identity.passwordhasheroptions.iterationcount?view=aspnetcore-6.0&source=docs#microsoft-aspnetcore-identity-passwordhasheroptions-iterationcount

Looks like this needs a bit of the old SiteHelp 😄.

pampua84 commented 1 year ago

Yes you are right in .net 7 it is 100_000. On the document but whatever version you choose is always 10_000 😄. Do I need to change the issue and title?

guardrex commented 1 year ago

@Rick-Anderson will take a look and see where this goes next. It looks like a doc system bug to me.