Merge pull request #11816 from overleaf/jpa-re-encrypt-v2
[access-token-encryptor] flag v2 tokens for re-encryption GitOrigin-RevId: 4ccb6d220d74a821f2fef8c72267f174cc2c502f
This commit is contained in:
@@ -40,9 +40,9 @@ async function count(collectionName, paths) {
|
||||
for (const [name, path] of Object.entries(paths)) {
|
||||
const blob = _.get(doc, path)
|
||||
if (!blob) continue
|
||||
// Schema: LABEL:SALT:CIPHERTEXT:IV
|
||||
const [label, , , iv] = blob.split(':', 4)
|
||||
const version = iv ? 'v2' : 'v1'
|
||||
// Schema: LABEL-VERSION:SALT:CIPHERTEXT:IV
|
||||
const [label] = blob.split(':')
|
||||
const [, version] = label.split('-')
|
||||
|
||||
const key = [name, version, collectionName, path, label].join(':')
|
||||
stats[key] = (stats[key] || 0) + 1
|
||||
|
||||
Reference in New Issue
Block a user