Pwned Versions Save

😱 An easy, Ruby way to use the Pwned Passwords API.

v2.4.1

1 year ago
  • Minor updates

    • Adds French and Dutch translations
    • Adds Rails 7 to the test matrix

v2.2.0

3 years ago
  • Minor updates

    • Adds :proxy option to request_options to directly set a proxy on the request. Fixes #21, thanks dparpyani.

v2.1.0

3 years ago
  • Minor updates

    • Adds Pwned::HashedPassword class which is initializd with a SHA1 hash to query the API with so that the lookup can be done in the background without storing passwords. Fixes #19, thanks @paprikati.

v2.0.0

4 years ago

Major updates

  • Switches from open-uri to Net::HTTP. This is a potentially breaking change.

  • request_options are now used to configure Net::HTTP.start.

  • Rather than using all string keys from request_options, HTTP headers are now specified in their own headers hash. To upgrade, any options intended as headers need to be extracted into a headers hash, e.g.

      validates :password, not_pwned: {
    -    request_options: { read_timeout: 5, open_timeout: 1, "User-Agent" => "Super fun user agent" }
    +    request_options: { read_timeout: 5, open_timeout: 1, headers: { "User-Agent" => "Super fun user agent" } }
      }
    
    -  password = Pwned::Password.new("password", 'User-Agent' => 'Super fun new user agent')
    +  password = Pwned::Password.new("password", headers: { 'User-Agent' => 'Super fun new user agent' }, read_timeout: 10)
    
  • Adds a CLI to let you check passwords on the command line

    $ pwned password
    Pwned!
    The password has been found in public breaches 3730471 times.