Default systemd credential name is rejected #1044
Labels
No labels
blocked
breaking
bug
data loss
design finalized
good first issue
new feature area
question / support
security
waiting for response
No milestone
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
borgmatic-collective/borgmatic#1044
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What I'm trying to do and why
I am attempting to use the recently added systemd credential support, using the hardcoded default credential name (
borgmatic.pw) in the systemd unit file.Steps to reproduce
Follow the instructions in the manual for setting up systemd service credentials, using the built-in credential support rather than
encryption_passcommand.Actual behavior
Expected behavior
The credential loads successfully.
Other notes / implementation ideas
It looks like this happens because the systemd credential loader requires the name to match the regex
^\w+$. This does not allow the.character, therefore the default credential name is rejected. I think either the regex should be made less restrictive or the default name should be changed.borgmatic version
1.9.14
borgmatic installation method
Arch Linux package
Borg version
1.4.0
Python version
3.13.2
Database version (if applicable)
No response
Operating system and version
Arch Linux
Thanks for filing this! You are absolutely right about the cause here. I'll make the regular expression less restrictive. (It's so restrictive right now to prevent path injection attacks.)
This is fixed in main and will be part of the next release! If you want to get the fix locally before then and don't mind modifying your local borgmatic install, you could update the regular expression yourself.
Thanks again!
Thank you!
Released in borgmatic 2.0.0!