docker-borgmatic icon indicating copy to clipboard operation
docker-borgmatic copied to clipboard

Passphrase env vars with special characters no longer work with 1.8.13

Open witten opened this issue 6 months ago • 8 comments

As of docker-borgmatic 1.8.13, some Borg passphrases that worked fine with 1.8.12 no longer work. For instance:

$ docker run --rm -e BORG_PASSPHRASE='`' ghcr.io/borgmatic-collective/borgmatic:1.8.13
[custom-init] Docker CLI variable not set, skipping...
[custom-init] No custom packages found, skipping...
/etc/s6-overlay/env/cron-env: line 1: unexpected EOF while looking for matching ``'
-----------------------------------
Software Versions:
...

Which, if cron is actually configured and runs, leads to a Borg error about: passphrase supplied in BORG_PASSPHRASE, by BORG_PASSCOMMAND or via BORG_PASSPHRASE_FD is incorrect.

Whereas with 1.8.12:

$ docker run --rm -e BORG_PASSPHRASE='`' ghcr.io/borgmatic-collective/borgmatic:1.8.12
[custom-init] Docker CLI variable not set, skipping...
[custom-init] No custom packages found, skipping...
-----------------------------------
Software Versions:

And then if cron is actually configured, the passphrase comes through correctly and there's no error from Borg.

I believe the problem was likely introduced in #331 and specifically in https://github.com/borgmatic-collective/docker-borgmatic/pull/331/files#diff-df5fc4ba71d9f961534c2d65215e50da1befb1f2a16c4a03c58eba442f8c5dc3

It's possible that a backtick is not the only special character broken in this way by 1.8.13.

witten avatar Aug 11 '24 17:08 witten