Skip to content
This repository has been archived by the owner on Feb 1, 2023. It is now read-only.

Repetition matcher fails with special UTF-8 characters #44

Open
zekroTJA opened this issue Feb 1, 2023 · 0 comments
Open

Repetition matcher fails with special UTF-8 characters #44

zekroTJA opened this issue Feb 1, 2023 · 0 comments

Comments

@zekroTJA
Copy link

zekroTJA commented Feb 1, 2023

It seems like the repeat matcher has trouble detecting special UTF-8 characters. This is especially unhandy because that includes German umlauts which are fairly common to be used in passwords in German speaking countries.

Here is an example reproducing the issue.

package main

import (
	"fmt"

	"github.com/nbutton23/zxcvbn-go"
)

func main() {
	res := zxcvbn.PasswordStrength("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", nil)
	fmt.Println(res.Entropy)

	res = zxcvbn.PasswordStrength("ööööööööööööööööööööööööööööööööööööö", nil)
	fmt.Println(res.Entropy)

	res = zxcvbn.PasswordStrength("øøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøø", nil)
	fmt.Println(res.Entropy)
}

Demonstration:
https://go.dev/play/p/2u3-KnZXGKK

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant