Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

opgen doesn't allow "ambiguous" #36

Open
jpgoldberg opened this issue May 1, 2019 · 2 comments
Open

opgen doesn't allow "ambiguous" #36

jpgoldberg opened this issue May 1, 2019 · 2 comments

Comments

@jpgoldberg
Copy link
Contributor

It appears that adding "ambiguous" to the allow flag in the command-line has no effect.

$ opgen characters -allow=uppercase,lowercase,digits,ambiguous -length=20 -entropy
115.63
$ opgen characters -allow=uppercase,lowercase,digits -length=20 -entropy
115.63

And we can see that with "ambiguous" we don't get any ambiguous characters

$ for i in {1..100}; do opgen characters -allow=uppercase,lowercase,digits,ambiguous -length=50 ; done | grep '[1I05Sl]'
$

So no ambiguous characters appeared in 100 50 character passwords for which "ambiguous" was listed as allowed.

Note that this appears to be a problem with the CLI only.

@robyoder
Copy link
Contributor

robyoder commented May 1, 2019

This is because the default exclude param is set to ambiguous. If you set exclude explicitly to none, it should work as you expect. I agree this isn't intuitive though. Perhaps all char set defaults should be thrown out as soon as one is defined explicitly?

@jpgoldberg
Copy link
Contributor Author

After looking at the code, I see that there is a messy way to fix it (with lots of logic) or the quick way to fix it, which to not have any default excludes. I'm inclined for the quick fix.

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

No branches or pull requests

2 participants