backups: force ASCII when writing backup header
This commit is contained in:
		
							parent
							
								
									68460fb272
								
							
						
					
					
						commit
						58128a574a
					
				@ -391,10 +391,11 @@ def prepare_backup_header(target_directory, passphrase, compressed=False,
 | 
				
			|||||||
                          crypto_algorithm=DEFAULT_CRYPTO_ALGORITHM):
 | 
					                          crypto_algorithm=DEFAULT_CRYPTO_ALGORITHM):
 | 
				
			||||||
    header_file_path = os.path.join(target_directory, HEADER_FILENAME)
 | 
					    header_file_path = os.path.join(target_directory, HEADER_FILENAME)
 | 
				
			||||||
    with open(header_file_path, "w") as f:
 | 
					    with open(header_file_path, "w") as f:
 | 
				
			||||||
        f.write("%s=%s\n" % (BackupHeader.hmac_algorithm, hmac_algorithm))
 | 
					        f.write(str("%s=%s\n" % (BackupHeader.hmac_algorithm, hmac_algorithm)))
 | 
				
			||||||
        f.write("%s=%s\n" % (BackupHeader.crypto_algorithm, crypto_algorithm))
 | 
					        f.write(str("%s=%s\n" % (BackupHeader.crypto_algorithm,
 | 
				
			||||||
        f.write("%s=%s\n" % (BackupHeader.encrypted, str(encrypted)))
 | 
					                                 crypto_algorithm)))
 | 
				
			||||||
        f.write("%s=%s\n" % (BackupHeader.compressed, str(compressed)))
 | 
					        f.write(str("%s=%s\n" % (BackupHeader.encrypted, str(encrypted))))
 | 
				
			||||||
 | 
					        f.write(str("%s=%s\n" % (BackupHeader.compressed, str(compressed))))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    hmac = subprocess.Popen (["openssl", "dgst",
 | 
					    hmac = subprocess.Popen (["openssl", "dgst",
 | 
				
			||||||
                              "-" + hmac_algorithm, "-hmac", passphrase],
 | 
					                              "-" + hmac_algorithm, "-hmac", passphrase],
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user