dcodeIO / bcrypt.js

Optimized bcrypt in plain JavaScript with zero dependencies.
Other
3.47k stars 264 forks source link

issues with compare/compareSync via docker compose env #139

Closed bigteejay closed 1 year ago

bigteejay commented 1 year ago

If hashes are made available to a Docker compose environment (not advising as secure/best practice) via a .env file, and compareSync returns false with true input, ensure you're using single quotes (') to enclose the hash after the equal (=) sign in the .env file. Otherwise, "$" characters can trigger parameter expansion (variables to be inserted/interpreted instead of the literal hash value).

I didn't see this mentioned elsewhere and it caused a bit of headache (user error).