wordpress-hash-node icon indicating copy to clipboard operation
wordpress-hash-node copied to clipboard

Won't work correctly

Open Bizarrus opened this issue 8 years ago • 7 comments

Trying with Wordpress v4.7.

The hash is not correct: WordPress: $P$BARQGysBO3eGVvlkGtu31ra84.JYkV/ wordpress-hash-node: $P$Bk73GCVnE1aA6YxnXe9fYaG5CZ5Lfj.

Had try to debug. But the phpass methods are the same like your node-module.

Any solutions?

Bizarrus avatar Dec 22 '16 00:12 Bizarrus

It's because your version might be outputting to binary or utf8.

I've forked and released this repo to ensure the latest commit worked. Otherwise play with line 14 in phpfunctions.js to get your expected result

jpike88 avatar Jan 13 '17 07:01 jpike88

There seems no available solution to this problem?

Yakima-Teng avatar Aug 24 '17 02:08 Yakima-Teng

Read my last comment, I fixed it in my fork

jpike88 avatar Aug 24 '17 04:08 jpike88

I am sorry, but I also was not able to make it work. Is there a definitive solution?

Dayany avatar Oct 02 '17 13:10 Dayany

Partialy works for me. It's work only for password without utf-8 char. Ex : 'pwdé' doesn't work

Also tested by changing phpfunctions.js line 14: hash.update(string, 'utf8'); and other here

ManUtopiK avatar Jun 07 '19 19:06 ManUtopiK

You need to encode the plain text password using for instance utf8 library before passing it onto the checker function.

wowczarczyk avatar Dec 30 '19 00:12 wowczarczyk

Another package worked for me without issues:

https://www.npmjs.com/package/wordpress-password-js

begoon avatar Jan 12 '24 13:01 begoon