Skip to content
This repository has been archived by the owner on Apr 8, 2022. It is now read-only.

Do not run zxcvbn on long passwords #34

Merged
merged 3 commits into from May 6, 2018
Merged

Do not run zxcvbn on long passwords #34

merged 3 commits into from May 6, 2018

Conversation

ghost
Copy link

@ghost ghost commented May 6, 2018

As I know from personal experience, long passwords result in the web-page hanging due to strength estimation.

@Lemmmy
Copy link
Member

Lemmmy commented May 6, 2018

I would consider placing this limit as 64 chars instead, as you can get pretty insecure passwords by combining 3 dictionary words that are still longer than 24 chars.

@Lemmmy
Copy link
Member

Lemmmy commented May 6, 2018

According to this issue and a few related issues, the issues only start to appear in the order of 256+ chars, so this limit could be placed around 128 safely, while still ensuring the security of passwords is properly checked.

@ghost
Copy link
Author

ghost commented May 6, 2018

Changed to 128

} else {
let strength = zxcvbn(password);
let score = strength.score;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can't be right. let variables do not exist outside of their scope like vars do. I think you mean:

const score = password.length >= 128 ? 5 : zxcvbn(password).score;

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahhh you beat me

@Lemmmy Lemmmy dismissed a stale review May 6, 2018 20:22

Lignum's review is better

@Lemmmy Lemmmy merged commit 9d6b947 into tmpim:master May 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants