question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PasswordValidator - why does IsUpper and IsLower methods checks only latin characters

See original GitHub issue

Summary

When checking if password contains upper/lower characters it only checks for ‘A-Z’/‘a-z’. It’s not useful as other non-latin characters can be used in password.

Motivation and goals

Imporve PasswordValidator usage with non-latin symbols

Risks / unknowns

It’s a breaking change

Detailed design

IsUpper method should use Char.IsUpper method, and IsLower should use Char.IsLower methods

Issue Analytics

  • State:closed
  • Created 4 months ago
  • Comments:14 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
mkArtakMSFTcommented, Jun 6, 2023

Thanks for helping out with this, @martincostello 👍

1reaction
Bykievcommented, Jun 2, 2023

I found this SO answer and it’s working fine

Because TryAddScoped is used, service is registered only if it wasn’t registered https://github.com/dotnet/aspnetcore/blob/d919168952ac4da33be8532c6980547a783a7389/src/Identity/Core/src/IdentityServiceCollectionExtensions.cs#L89

Read more comments on GitHub >

github_iconTop Results From Across the Web

Regex for password must contain at least eight characters ...
I want a regular expression to check that: A password contains at least eight characters, including at least one number and includes both...
Read more >
string isupper() and islower() methods with examples
Python isupper() and islower() are in-built methods in Python, that are used to check if a string is in uppercase or lowercase.
Read more >
isupper(), islower(), lower(), upper() in Python and their ...
This method returns True if all characters in the string are uppercase, otherwise, returns “False”. It returns “True” for whitespaces but if ...
Read more >
Python string.isupper() Method (With Examples)
The isupper() method checks whether all the characters of a given string are uppercase or not. It returns True if all characters are...
Read more >
Problems with isupper & islower function - C++ Forum
I'm working on a password validator program and I can't understand why it continues to crash. Visual studio throws a debug assertion failed....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found