Skip to content

Does not support UTF-8 characters #1

@ostinelli

Description

@ostinelli
# encoding: utf-8
require 'phpass'

password = "pässørd"
phpass = Phpass.new(8)

password_digest = "$P$Bb/iWY7RbqXpO0zN/oZZPbKz9p/w93."
phpass.check(password, password_digest)

This will blow up on the phpass.check line:

/Users/roberto/.rvm/gems/ruby-2.2.2@beehive/gems/phpass-ruby-0.1.2/lib/phpass/md5.rb:43:in `crypt': incompatible character encodings: ASCII-8BIT and UTF-8 (Encoding::CompatibilityError)
    from /Users/roberto/.rvm/gems/ruby-2.2.2@beehive/gems/phpass-ruby-0.1.2/lib/phpass/md5.rb:21:in `check'
    from /Users/roberto/.rvm/gems/ruby-2.2.2@beehive/gems/phpass-ruby-0.1.2/lib/phpass.rb:20:in `check'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions