Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sysutils/git-backup Add ability to hide secret from git backup #4558

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
sysutil/git-backup fix hacred password removal
Whidix committed Feb 23, 2025
commit 0f86828d580a963b672ffdea725df2b03b6f71d5
7 changes: 4 additions & 3 deletions sysutils/git-backup/src/etc/rc.syshook.d/config/10-git-backup
Original file line number Diff line number Diff line change
@@ -78,9 +78,10 @@ if len(sys.argv) > 1:
try:
conf_tree = ET.parse('/conf/backup/git/config.xml')
conf_xmlroot = conf_tree.getroot()
password = conf_xmlroot.find('./system/backup/hasync/password')
password.text = ''
conf_tree.write
password = conf_xmlroot.find('./hasync/password')
if password is not None:
password.text = ''
conf_tree.write('/conf/backup/git/config.xml')
except (FileNotFoundError, ET.ParseError):
syslog.syslog(syslog.LOG_ERR, 'Could not parse or open /conf/backup/git/config.xml')
sys.exit(1)
Original file line number Diff line number Diff line change
@@ -91,7 +91,7 @@ public function getConfigurationFields()
"label" => gettext("Hide HA Sync Credential"),
"help" => gettext("When enabled, HA sync password will be hidden from backup."),
"value" => null
],
]
];
$mdl = new GitSettings();
foreach ($fields as &$field) {