You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Password below is hiccup if anyone wants to attempt to reproduce this. I've generated it using caddy hash-password, using the default algorithm (bcrypt), and produces this:
I can login with jeto3 but neither jeto or jeto2, which both generate the following error:
crypto/bcrypt: hashedSecret too short to be a bcrypted password
I believe the double dollar should not need to be present in the env file. Actually, if I test it locally with just caddy, it works. The problem is if I don't double them using caddy-docker-proxy, I get the "illegal base64 data" error quoted within the ".caddyenv" section above.
I've also tried surrounding the value with double quotes (both with and without double dollars), but still cannot login.
I feel like I've tried everything possible. Is this a bug, or am I missing something?
Thanks!
The text was updated successfully, but these errors were encountered:
I'll leave this issue open just in case for now (feel free to close it though). It's probably a caddy issue but I'm not sure, since it works out of the box for me with a local installation of its latest standalone version. Maybe they've fixed something along the way?
This is just a compat issue with Docker's env var loader. Not a Caddy problem.
Ah OK, didn't think it'd be Docker-related as I assumed that env variable was just working like --envfile by referencing a file to Caddy, which in turn retrieved the environment variables from it.
Maybe a small paragraph in the README (e.g. "It is recommended to surround complex values with single quotes to avoid character parsing issues.") could help people running into the same thing in the future?
In any case, again, feel free to close this issue.
Password below is
hiccup
if anyone wants to attempt to reproduce this. I've generated it usingcaddy hash-password
, using the default algorithm (bcrypt), and produces this:compose.yaml
Three dummy users to test different scenarios. Escaping (doubling) the dollars as it's needed for this syntax.
.caddyenv
This is linked via
CADDY_DOCKER_ENVFILE
.Note: I've doubled the dollar signs because if I don't, I get the following error when running Caddy:
Resulting Caddyfile
Looks correct to me.
Outcome
I can login with
jeto3
but neitherjeto
orjeto2
, which both generate the following error:I believe the double dollar should not need to be present in the env file. Actually, if I test it locally with just caddy, it works. The problem is if I don't double them using caddy-docker-proxy, I get the "illegal base64 data" error quoted within the ".caddyenv" section above.
I've also tried surrounding the value with double quotes (both with and without double dollars), but still cannot login.
I feel like I've tried everything possible. Is this a bug, or am I missing something?
Thanks!
The text was updated successfully, but these errors were encountered: