mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #11833 from overleaf/jpa-v2-fallback
[access-token-encryptor] scripts: fallback version to v2 GitOrigin-RevId: 232e6b1f6b8667a58c5fd0f5caf604209f100809
This commit is contained in:
parent
d06a578492
commit
79f7d259e9
2 changed files with 4 additions and 2 deletions
|
@ -70,7 +70,8 @@ async function reEncryptTokensInCollection({
|
|||
if (!blob) continue
|
||||
// Schema: LABEL-VERSION:SALT:CIPHERTEXT:IV
|
||||
const [label] = blob.split(':')
|
||||
const [, version] = label.split('-')
|
||||
let [, version] = label.split('-')
|
||||
version = version || 'v2'
|
||||
|
||||
const key = [name, version, collectionName, path, label].join(':')
|
||||
stats[key] = (stats[key] || 0) + 1
|
||||
|
|
|
@ -42,7 +42,8 @@ async function count(collectionName, paths) {
|
|||
if (!blob) continue
|
||||
// Schema: LABEL-VERSION:SALT:CIPHERTEXT:IV
|
||||
const [label] = blob.split(':')
|
||||
const [, version] = label.split('-')
|
||||
let [, version] = label.split('-')
|
||||
version = version || 'v2'
|
||||
|
||||
const key = [name, version, collectionName, path, label].join(':')
|
||||
stats[key] = (stats[key] || 0) + 1
|
||||
|
|
Loading…
Reference in a new issue