getmeli / meli

Platform for deploying static sites and frontend applications easily. Automatic SSL, deploy previews, reverse proxy, and more.
Other
2.41k stars 97 forks source link

Trying to set a branch password crashes Meli #6

Closed queicherius closed 3 years ago

queicherius commented 3 years ago

When I head over to a branch and check the "protected" box, and confirm the modal, Meli crashes with no logs and exit code 139 (running in Docker, on the getmeli/meli:beta image).

gempain commented 3 years ago

@queicherius thanks for reporting, and sorry for the inconvenience. I'll check this right away and get back to you. i'll add this to the next release.

gempain commented 3 years ago

@queicherius I can confirm this, it's odd, the container crashes right away and restarts. I tested with the development setup and it works, so I'm assuming this is related to Caddy and Meli being together inside the container. Investigating with @pimartin.

gempain commented 3 years ago

The issue comes from bcrypt throwing an error and crashing Node when hashing the provided password. I'll fix this first thing tomorrow morning. Iv'e been wanting to drop bcrypt for scrypt for a while, because scrypt is natively supported by Node's crypto and Caddy supports it for basic auth, so I'll do both at once.

gempain commented 3 years ago

@queicherius this fix was released in v1.0.0-beta.5. We dropped bcrypt and now use scrypt. Note that we removed the MELI_BCRYPT_SALT_ROUNDS environment variable, but I doubt you used it. I'm closing, but you may continue to reply if further help is required. We'll reopen if needed. Again, many thanks for contributing to this project.