Coder Social home page Coder Social logo

mxrxdxn / pwned-passwords Goto Github PK

View Code? Open in Web Editor NEW
30.0 30.0 4.0 107 KB

A PHP library to query Troy Hunt's Pwned Passwords service to see whether or not a password has been included in a public breach.

License: MIT License

PHP 100.00%
breach password password-strength passwords php php7 pwnedpasswords security

pwned-passwords's People

Contributors

azjezz avatar pocketarc avatar sapphyrus avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

pwned-passwords's Issues

Returns false for passwords found once

In your readme.md you write:

The isInsecure method will return true if the password has been found in the PwnedPasswords API, and false if not.

However due to the option $maxUsage = 1 and

               if (intval($passwordLine[1]) > $maxUsage) {
                    return true;
                }

(n.b. you used greater) the function returns false for passwords found exactly once in the API.

I tested it using the hash ABCDE028DA52CF202EA546E9A7669C7614D64DCD, but I don't know what password it's for (i just found it having one appearance for ABCDE :-)).

To fix that I suggest to set the default value for $maxUsage to 0 in order to comply with the function documentation, the readme and the naming of $maxUsage (which to me implies that a password occurring exactly $maxUsage times should return false).

Greetings
Nmxcgeo

All i get is blank pages

Im just getting blank pages, things should just work out of the box but with php password checks for have i been pwned just shows blank pages and warnings upon install saying its outdated! i expect a page with a form a user can put in there password and then it will be checked i need this done in plain text as i dont use sha or md5 i use a custom password algo that wont be found anywhere so plaintext or sha1 version of password may still work but at present all i get is blank pages this is not good, along with using bs libraries is also not ideal, stick to native php code no libs required and then things wont go wrong i hate using composer and other frameworks again just stick to native php code get this working all from 1 php file as your only sending data to api and getting response after all so i expect this to be fixed and all redundant bs code an libs to be removed and 1 single native php to just return is password is compromised or not when can i expect this new update?

ps iv tried 2 now an running out of patients all i want is this simple concept working for users can be secure thats all! thanks!

put in how i can do this manually if you wont update your old crappy code please. i dont mind doing it just explain how i could do it how i describe thanks

Returns false if cURL request fails

How to reproduce:

  1. Unset curl.cainfo in php.ini or change the API URL to something invalid

  2. Run the following script

<?php

require_once('vendor/autoload.php');

$pp = new PwnedPasswords\PwnedPasswords;

// will return false
var_dump($pp->isInsecure('password'));

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.