manifest: revert canonicalization to old behaviour
JSON keys MUST be quoted. this is a one-time break in signature validation for backups created with the broken canonicalization code. QEMU backups are not affected, as libproxmox-backup-qemu never linked the broken versions. Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
		
				
					committed by
					
						
						Thomas Lamprecht
					
				
			
			
				
	
			
			
			
						parent
						
							eb13d9151a
						
					
				
				
					commit
					1b1110581a
				
			@ -160,12 +160,12 @@ impl BackupManifest {
 | 
				
			|||||||
                keys.sort();
 | 
					                keys.sort();
 | 
				
			||||||
                let mut iter = keys.into_iter();
 | 
					                let mut iter = keys.into_iter();
 | 
				
			||||||
                if let Some(key) = iter.next() {
 | 
					                if let Some(key) = iter.next() {
 | 
				
			||||||
                    output.extend(key.as_bytes());
 | 
					                    Self::write_canonical_json(&key.into(), output)?;
 | 
				
			||||||
                    output.push(b':');
 | 
					                    output.push(b':');
 | 
				
			||||||
                    Self::write_canonical_json(&map[key], output)?;
 | 
					                    Self::write_canonical_json(&map[key], output)?;
 | 
				
			||||||
                    for key in iter {
 | 
					                    for key in iter {
 | 
				
			||||||
                        output.push(b',');
 | 
					                        output.push(b',');
 | 
				
			||||||
                        output.extend(key.as_bytes());
 | 
					                        Self::write_canonical_json(&key.into(), output)?;
 | 
				
			||||||
                        output.push(b':');
 | 
					                        output.push(b':');
 | 
				
			||||||
                        Self::write_canonical_json(&map[key], output)?;
 | 
					                        Self::write_canonical_json(&map[key], output)?;
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user