Git Product home page Git Product logo

Comments (5)

axelson avatar axelson commented on September 28, 2024

Is it expected for ZXCVBN to raise an exception if provided a non-unicode string until this option is implemented?

Currently I see:

  test "unicode support" do
    password = "🏆🔥 and words"
    ZXCVBN.zxcvbn(password)
  end

     ** (UnicodeConversionError) incomplete encoding starting at <<240, 159>>
     code: ZXCVBN.zxcvbn(password)
     stacktrace:
       (elixir) lib/string.ex:2157: String.to_charlist/1
       (zxcvbn) lib/zxcvbn/matching.ex:565: anonymous fn/4 in ZXCVBN.Matching.do_sequence_match/2
       (elixir) lib/enum.ex:3003: Enum.reduce_range_inc/4
       (zxcvbn) lib/zxcvbn/matching.ex:561: ZXCVBN.Matching.do_sequence_match/2
       (elixir) lib/enum.ex:1327: Enum."-map/2-lists^map/1-0-"/2
       (elixir) lib/enum.ex:1327: Enum."-map/2-lists^map/1-0-"/2
       (zxcvbn) lib/zxcvbn/matching.ex:101: ZXCVBN.Matching.omnimatch/2
       (zxcvbn) lib/zxcvbn.ex:92: ZXCVBN.zxcvbn/2
       test/zxcvbn_test.exs:44: (test)

This test is with emoji but I believe it holds for foreign language characters as well.

from zxcvbn-elixir.

techgaun avatar techgaun commented on September 28, 2024

@axelson yep that's a known issue and is happening because it handles ASCII only at this time. I am working on getting support for this. I believe non-ASII passwords are used by very less percentage of people given the lack of support on various different platforms.

from zxcvbn-elixir.

axelson avatar axelson commented on September 28, 2024

@techgaun any progress on this?

from zxcvbn-elixir.

techgaun avatar techgaun commented on September 28, 2024

@axelson I've added some support for this on master branch but need some time to do testing. Feel free to give master branch a try and see if that works in your case. I do need to spend some time to clean that up but I've not been finding time due to job and personal reasons for last few months.

from zxcvbn-elixir.

axelson avatar axelson commented on September 28, 2024

Okay, I'll take a look at the version in master when I get a chance

from zxcvbn-elixir.

Related Issues (14)

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.