1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-06-27 16:36:00 +00:00

doc: add note regarding validateUsername

This commit is contained in:
Frédéric Guillot 2024-12-26 15:01:36 -08:00
parent b87c547a07
commit fc3c4873e5

View file

@ -153,6 +153,10 @@ func validatePassword(password string) *locale.LocalizedError {
// validateUsername return an error if the `username` argument contains
// a character that isn't alphanumerical nor `_` and `-`.
//
// Note: this validation should not be applied to previously created usernames,
// and cannot be applied to Google/OIDC accounts creation because the email
// address is used for the username field.
func validateUsername(username string) *locale.LocalizedError {
if strings.ContainsFunc(username, func(r rune) bool {
if unicode.IsLetter(r) || unicode.IsNumber(r) {