add version check in decryptCollectionPath to get correct decryptionKey
This commit is contained in:
parent
fd322dac33
commit
bc0718d806
1 changed files with 4 additions and 1 deletions
|
@ -320,9 +320,12 @@ class CollectionsService {
|
|||
}
|
||||
|
||||
String decryptCollectionPath(Collection collection) {
|
||||
final key = collection.attributes.version != null
|
||||
? getCollectionKey(collection.id)
|
||||
: _config.getKey();
|
||||
return utf8.decode(CryptoUtil.decryptSync(
|
||||
Sodium.base642bin(collection.attributes.encryptedPath),
|
||||
_config.getKey(),
|
||||
key,
|
||||
Sodium.base642bin(collection.attributes.pathDecryptionNonce)));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue