Node.js based forum software built for the modern web
fix: #9204, bypass groupname length check for system group in upgrade script
Barış Soner Uşaklı00ba89b6d635
diff --git a/src/upgrades/1.15.0/verified_users_group.js b/src/upgrades/1.15.0/verified_users_group.jsindex 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']);