Closed SimonLefort closed 3 years ago
Hello, I installed Borg on my Yunohost servers and when I want to see if I can read backups, I can't because passphrase seems incorrect. So I dug into it.
The problem is, I think, in this script :
# cat /etc/yunohost/hooks.d/backup_method/05-borg_app (...) BORG_PASSPHRASE="RGjauGbbg6d$jj77g*piabfbfGedE" (...)
(I changed the passphrase, obviously..)
Yunohost saved the complete passphrase :
# yunohost app setting borg passphrase RGjauGbbg6d$jj77g*piabfbfGedE
But "$jj77g" is considered like an empty variable. Finally, borg used "RGjauGbbg6d*piabfbfGedE". We have to change " -> ' in the script.
$ PASSPHRASE="gaghtbgg$TEXT*gloa" $ echo $PASSPHRASE gaghtbgg*gloa $ PASSPHRASE='gaghtbgg$TEXT*gloa' $ echo $PASSPHRASE gaghtbgg$TEXT*gloa
Perhaps we should add a warning during installation to say it's better to avoid some special characters ( ' , " , $ , .. ) ?
Fixed in #71
Hello, I installed Borg on my Yunohost servers and when I want to see if I can read backups, I can't because passphrase seems incorrect. So I dug into it.
The problem is, I think, in this script :
(I changed the passphrase, obviously..)
Yunohost saved the complete passphrase :
But "$jj77g" is considered like an empty variable. Finally, borg used "RGjauGbbg6d*piabfbfGedE". We have to change " -> ' in the script.
Perhaps we should add a warning during installation to say it's better to avoid some special characters ( ' , " , $ , .. ) ?