소스 검색

Add single quotes around the password.

When the DB password uses some special characters, the
defaults-extra-file can be incorrect. In the case of a password with
the # symbol, anything after that is considered a comment. The single
quotes around the password rectify this.
Geoff Holden 3 달 전
부모
커밋
18ffd96d62
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      borgmatic/hooks/data_source/mariadb.py

+ 1 - 1
borgmatic/hooks/data_source/mariadb.py

@@ -68,7 +68,7 @@ def make_defaults_file_options(username=None, password=None, defaults_extra_file
     values = '\n'.join(
         (
             (f'user={username}' if username is not None else ''),
-            (f'password={password}' if password is not None else ''),
+            (f'password=\'{password}\'' if password is not None else ''),
         )
     ).strip()