motdotla / dotenv-expand

Variable expansion for dotenv. Expand variables already on your machine for use in your .env file.

Home Page:https://dotenvx.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't handle bcrypt password structure

felixmosh opened this issue Β· comments

Hi,

I've encountered with a weird bug, I've a bcrypt pass that looks like that $2b$10$OMZ69gxxsmRgwAt945WHSujpr/u8ZMx.xwtxWOCMkeMW7p3XqKYca (it is not a real pass 😁), I've escaped the $ sign \$2b\$10\$OMZ69gxxsmRgwAt945WHSujpr/u8ZMx.xwtxWOCMkeMW7p3XqKYca it falls to the first condition, and therefore it returns $2b\$10\$OMZ69gxxsmRgwAt945WHSujpr/u8ZMx.xwtxWOCMkeMW7p3XqKYca that is wrong.

I don't think that it is a good solution to escape only the first $, which will work till it won't.

So, I will make a PR for more robust solution.