mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-26 23:28:14 +03:00
Always generate random initialization vector when uploading encrypted file.
Signed-off-by: alex-z <blackslayer4@gmail.com>
This commit is contained in:
parent
14072703c4
commit
75fd1d21be
1 changed files with 2 additions and 1 deletions
|
@ -155,7 +155,6 @@ void PropagateUploadEncrypted::slotFolderEncryptedMetadataReceived(const QJsonDo
|
|||
if (!found) {
|
||||
encryptedFile.encryptionKey = EncryptionHelper::generateRandom(16);
|
||||
encryptedFile.encryptedFilename = EncryptionHelper::generateRandomFilename();
|
||||
encryptedFile.initializationVector = EncryptionHelper::generateRandom(16);
|
||||
encryptedFile.fileVersion = 1;
|
||||
encryptedFile.metadataKey = 1;
|
||||
encryptedFile.originalFilename = fileName;
|
||||
|
@ -169,6 +168,8 @@ void PropagateUploadEncrypted::slotFolderEncryptedMetadataReceived(const QJsonDo
|
|||
encryptedFile.mimetype = QByteArrayLiteral("httpd/unix-directory");
|
||||
}
|
||||
}
|
||||
|
||||
encryptedFile.initializationVector = EncryptionHelper::generateRandom(16);
|
||||
|
||||
_item->_encryptedFileName = _remoteParentPath + QLatin1Char('/') + encryptedFile.encryptedFilename;
|
||||
_item->_isEncrypted = true;
|
||||
|
|
Loading…
Reference in a new issue