glauberportella / password-hash Goto Github PK
View Code? Open in Web Editor NEWA Node.js port of Wordpress /wp-includes/class-phpass.php class used to hash passwords.
A Node.js port of Wordpress /wp-includes/class-phpass.php class used to hash passwords.
A versão do bcrypt do projeto precisa do zip: bcrypt_lib-v3.0.8-node-v72-linux-x64-musl.tar.gz mas esse arquivo não existe na release 3.0.8. Uma possível solução seria atualizar a versão do bcrypt.
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'
}
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.
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.
Can you please make a new release with the bcrypt
#5 update?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.