From 00ba89b6d635d1db92789068a79a655d20314cc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Sat, 16 Jan 2021 09:37:32 -0500 Subject: [PATCH] fix: #9204, bypass groupname length check for system group in upgrade script --- src/upgrades/1.15.0/verified_users_group.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/upgrades/1.15.0/verified_users_group.js b/src/upgrades/1.15.0/verified_users_group.js index d09b5fa9e5..9d940f1f84 100644 --- a/src/upgrades/1.15.0/verified_users_group.js +++ b/src/upgrades/1.15.0/verified_users_group.js @@ -13,6 +13,9 @@ module.exports = { timestamp: Date.UTC(2020, 9, 13), method: async function () { const progress = this.progress; + + const maxGroupLength = meta.config.maximumGroupNameLength; + meta.config.maximumGroupNameLength = 30; const timestamp = await db.getObjectField('group:administrators', 'timestamp'); const verifiedExists = await groups.exists('verified-users'); if (!verifiedExists) { @@ -38,7 +41,8 @@ module.exports = { timestamp: timestamp + 1, }); } - + // restore setting + meta.config.maximumGroupNameLength = maxGroupLength; await batch.processSortedSet('users:joindate', async function (uids) { progress.incr(uids.length); const userData = await user.getUsersFields(uids, ['uid', 'email:confirmed']);