lib/protocol: Preserve sequence decrypting fileinfos (fixes #7994) (#7995)

This commit is contained in:
Simon Frei
2021-10-06 10:26:54 +02:00
committed by GitHub
parent 4e513b8393
commit c94b797f00
2 changed files with 15 additions and 0 deletions
+4
View File
@@ -365,6 +365,10 @@ func DecryptFileInfo(fi FileInfo, folderKey *[keySize]byte) (FileInfo, error) {
if err := proto.Unmarshal(dec, &decFI); err != nil {
return FileInfo{}, err
}
// Preserve sequence, which is legitimately controlled by the untrusted device
decFI.Sequence = fi.Sequence
return decFI, nil
}