Giter Site home page Giter Site logo

gchan / password_blocklist Goto Github PK

View Code? Open in Web Editor NEW
13.0 13.0 5.0 7.06 MB

Ruby gem to check a password against a blocklist of commonly used passwords

License: MIT License

Ruby 89.67% Shell 10.33%
password-blocklist pasword ruby ruby-gem ruby-on-rails rubygem security

password_blocklist's People

Contributors

dependabot[bot] avatar gchan avatar matssigge avatar roberttravispierce avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

password_blocklist's Issues

Regexp injection

This:

PasswordBlacklist::Checker.new.blacklisted? ')'

will cause a

RegexpError: unmatched close parenthesis: /)/

Similarly

PasswordBlacklist::Checker.new.blacklisted? '.*'

Always returns true because of it is not interpreted as a verbatim string.

Could you please use

/#{Regexp.quote(password.to_s)}/

In your check?

Thank you!

Renaming this RubyGem

Current thoughts on how to rename this RubyGem ๐Ÿ’ญ

  • Maintain functionality of published gems - do not break projects that depend on this library
    • Allow people to use the existing published gems (no yanking)
  • Encourage folks to use the renamed version of the gem
    • Release one last version of the current named gem with a deprecation notice? e.g. print to stdout a friendly message?
  • Provide an easy migration process
    • Unix script to do a find and replace. e.g. sed
  • Reserve the new name of the RubyGem by publishing a pre version
  • Consider the process factory_bot underwent. What went well, what didn't?

Performance of large word lists

I ended up creating a similar tool for one of my projects that uses the larger and more comprehensive word lists found here: https://github.com/berzerk0/Probable-Wordlists.

Dealing with such large lists is problematic because of their sheer size as this will require loading a large number of strings into memory or doing an operating system level comparison on the file. I found that I could get reasonable performance by recognizing that a large number of the words in the large lists were invalid due to other restrictions (i.e., not long enough, no number, no symbol, etc...).

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.