Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Keep old channel/user name constraints

Chocobozzz9f7a19536376
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts
index f1a734f48c..6971ab775a 100644
--- a/server/initializers/constants.ts
+++ b/server/initializers/constants.ts
@@ -302,7 +302,7 @@ const CONFIG = {
let CONSTRAINTS_FIELDS = {
USERS: {
- NAME: { min: 1, max: 50 }, // Length
+ NAME: { min: 1, max: 120 }, // Length
DESCRIPTION: { min: 3, max: 1000 }, // Length
USERNAME: { min: 1, max: 50 }, // Length
PASSWORD: { min: 6, max: 255 }, // Length
@@ -318,7 +318,7 @@ let CONSTRAINTS_FIELDS = {
REASON: { min: 2, max: 300 } // Length
},
VIDEO_CHANNELS: {
- NAME: { min: 1, max: 50 }, // Length
+ NAME: { min: 1, max: 120 }, // Length
DESCRIPTION: { min: 3, max: 1000 }, // Length
SUPPORT: { min: 3, max: 1000 }, // Length
URL: { min: 3, max: 2000 } // Length
diff --git a/server/tests/api/check-params/users.ts b/server/tests/api/check-params/users.ts
index 05f42bca99..ec35429d36 100644
--- a/server/tests/api/check-params/users.ts
+++ b/server/tests/api/check-params/users.ts
@@ -109,7 +109,7 @@ describe('Test users API validators', function () {
})
it('Should fail with a too long username', async function () {
- const fields = immutableAssign(baseCorrectParams, { username: 'super'.repeat(11) })
+ const fields = immutableAssign(baseCorrectParams, { username: 'super'.repeat(50) })
await makePostBodyRequest({ url: server.url, path, token: server.accessToken, fields })
})
@@ -560,7 +560,7 @@ describe('Test users API validators', function () {
})
it('Should fail with a too long username', async function () {
- const fields = immutableAssign(baseCorrectParams, { username: 'super'.repeat(11) })
+ const fields = immutableAssign(baseCorrectParams, { username: 'super'.repeat(50) })
await makePostBodyRequest({ url: server.url, path: registrationPath, token: server.accessToken, fields })
})