GithubHelp home page GithubHelp logo

password-hash's People

Contributors

donguks avatar glauberportella avatar leleofg avatar tombaileywzd 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

Watchers

 avatar

password-hash's Issues

New release

Can you please make a new release with the bcrypt #5 update?

International characters are causing the hash to not be compatible with WP hash

When I use WP to hash the password like this: aląmakota, I'll get some hash. When I take this hash and compare it against the aląmakota using this module, the result is false which means the password is incorrect. When I compare it using WP PasswordHash class, it says it's ok.
The same is in the other way. When I hash aląmakota using this module, I'll get some hash. When I take this hash and compare it using WP, the result is false.

All other passwords are OK both in WP and this module.

Error: ENOENT: no such file or directory, open 'c:\dev\urandom'

Error: ENOENT: no such file or directory, open 'c:\dev\urandom'
Emitted 'error' event on ReadStream instance at:
    at internal/fs/streams.js:121:12
    at FSReqCallback.oncomplete (fs.js:157:23) {
  errno: -4058,
  code: 'ENOENT',
  syscall: 'open',
  path: 'c:\\dev\\urandom'
}

bcrypt dependency fails on AWS Lambda

The AWS Lambda function with both password-hash and password-hash-leo dependencies gets an error when is invoked:

{
    "errorType": "Error",
    "errorMessage": "package.json does not exist at /package.json",
    "stack": [
        "Error: package.json does not exist at /package.json",
        "    at Object.exports.find (/var/task/node-functions/lambda/cognito/handleUserMigrationAuthentication.js:37011:15)",
        "    at Object.<anonymous> (/var/task/node-functions/lambda/cognito/handleUserMigrationAuthentication.js:176283:27)",
        "    at Object.<anonymous> (/var/task/node-functions/lambda/cognito/handleUserMigrationAuthentication.js:176516:30)",
        "    at __webpack_require__ (/var/task/node-functions/lambda/cognito/handleUserMigrationAuthentication.js:20:30)",
        "    at Object.<anonymous> (/var/task/node-functions/lambda/cognito/handleUserMigrationAuthentication.js:84834:16)",
        "    at __webpack_require__ (/var/task/node-functions/lambda/cognito/handleUserMigrationAuthentication.js:20:30)",
        "    at Module.exports.__esModule (/var/task/node-functions/lambda/cognito/handleUserMigrationAuthentication.js:85169:21)",
        "    at __webpack_require__ (/var/task/node-functions/lambda/cognito/handleUserMigrationAuthentication.js:20:30)",
        "    at /var/task/node-functions/lambda/cognito/handleUserMigrationAuthentication.js:84:18",
        "    at Object.<anonymous> (/var/task/node-functions/lambda/cognito/handleUserMigrationAuthentication.js:87:10)",
        "    at Module._compile (internal/modules/cjs/loader.js:778:30)",
        "    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)",
        "    at Module.load (internal/modules/cjs/loader.js:653:32)",
        "    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)",
        "    at Function.Module._load (internal/modules/cjs/loader.js:585:3)",
        "    at Module.require (internal/modules/cjs/loader.js:692:17)"
    ]
}

After some debugging, I could fix an issue with replacing bcrypt dependency with bcryptjs. The reason why it helped is bcrypt uses OS functions that don't exist for a Lambda environment. The bcrypjs on the other hand doesn't require that but it's a little bit slower. So eventually I have to use the raw source file with that workaround. I know bcrypt was updated to 5.0.0 version but that didn't help. Also, I couldn't reproduce the issue locally.

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.