Git Product home page Git Product logo

laravel-zxcvbn's Issues

'xcvbn_dictionary' test fails on any pattern match, not just by username or password

Referencing this block of code in the 'xcvbn_dictionary' test:

if (isset($zxcvbn['sequence'][0])) {
$dictionary = $zxcvbn['sequence'][0];
if (isset($dictionary->dictionaryName)) {
return false;
}
}

This will fail on ANY sequence match. So suppose the password includes pattern similar to one of the dictionary words, this property being checked for will be present. But it is not necessarily with regards to the username or email address. It could just be any other. This test should not fail in such a condition, but it will.

If you do want it to fail on any dictionary match, then the readme description needs to be updated.

This is a bit more interesting. zxcvbn_dictionary allows you to input both the users username and/or email, and their password. The validator checks that the password doesn't exist in the username, or that they are too similar.

I think it would make sense to extend "zxcvbn_min" to optionally accept the username and password as additional arguments, since that's where the target score can be set as well, and that's really what most users of this package are going to care about. I am going to go ahead and extend that to submit as a PR but let me know if you would not be willing to accept this.

Translations

Wold it be possible to allow translations for the validators? Would be awesome for multi-lang projects

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.