particle-iot / spark-server

UNMAINTAINED - An API compatible open source server for interacting with devices speaking the spark-protocol
https://www.particle.io/
GNU Affero General Public License v3.0
441 stars 136 forks source link

Fix broken hash function #81

Open akuma6099 opened 6 years ago

akuma6099 commented 6 years ago

Needed to add a "digest" key to the hash function to satisfy crypto.pbkdf2 otherwise the spark-server could not generate a user json config file. Now you can execute the following and you will get a bob.json file successfully:

curl -X POST http://192.168.1.50:8080/v1/users -d "username=bob" -d "password=123123"

:Doc: crypto.pbkdf2(password, salt, iterations, keylen, digest, callback)