diff options
author | Chocobozzz <me@florianbigard.com> | 2018-12-13 16:25:15 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-12-13 16:26:47 +0100 |
commit | 9f7a19536376657e12e453f2eab656f5f95678a8 (patch) | |
tree | 36a4175c01f2c426178a2916b5e8bcb4493d743b /server | |
parent | 16c07398f2ed884b9223b3e18c5e541cf9ab8469 (diff) | |
download | PeerTube-9f7a19536376657e12e453f2eab656f5f95678a8.tar.gz PeerTube-9f7a19536376657e12e453f2eab656f5f95678a8.tar.zst PeerTube-9f7a19536376657e12e453f2eab656f5f95678a8.zip |
Keep old channel/user name constraints
In order to avoid compatibility issues
Diffstat (limited to 'server')
-rw-r--r-- | server/initializers/constants.ts | 4 | ||||
-rw-r--r-- | server/tests/api/check-params/users.ts | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts index f1a734f48..6971ab775 100644 --- a/server/initializers/constants.ts +++ b/server/initializers/constants.ts | |||
@@ -302,7 +302,7 @@ const CONFIG = { | |||
302 | 302 | ||
303 | let CONSTRAINTS_FIELDS = { | 303 | let CONSTRAINTS_FIELDS = { |
304 | USERS: { | 304 | USERS: { |
305 | NAME: { min: 1, max: 50 }, // Length | 305 | NAME: { min: 1, max: 120 }, // Length |
306 | DESCRIPTION: { min: 3, max: 1000 }, // Length | 306 | DESCRIPTION: { min: 3, max: 1000 }, // Length |
307 | USERNAME: { min: 1, max: 50 }, // Length | 307 | USERNAME: { min: 1, max: 50 }, // Length |
308 | PASSWORD: { min: 6, max: 255 }, // Length | 308 | PASSWORD: { min: 6, max: 255 }, // Length |
@@ -318,7 +318,7 @@ let CONSTRAINTS_FIELDS = { | |||
318 | REASON: { min: 2, max: 300 } // Length | 318 | REASON: { min: 2, max: 300 } // Length |
319 | }, | 319 | }, |
320 | VIDEO_CHANNELS: { | 320 | VIDEO_CHANNELS: { |
321 | NAME: { min: 1, max: 50 }, // Length | 321 | NAME: { min: 1, max: 120 }, // Length |
322 | DESCRIPTION: { min: 3, max: 1000 }, // Length | 322 | DESCRIPTION: { min: 3, max: 1000 }, // Length |
323 | SUPPORT: { min: 3, max: 1000 }, // Length | 323 | SUPPORT: { min: 3, max: 1000 }, // Length |
324 | URL: { min: 3, max: 2000 } // Length | 324 | 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 05f42bca9..ec35429d3 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 () { | |||
109 | }) | 109 | }) |
110 | 110 | ||
111 | it('Should fail with a too long username', async function () { | 111 | it('Should fail with a too long username', async function () { |
112 | const fields = immutableAssign(baseCorrectParams, { username: 'super'.repeat(11) }) | 112 | const fields = immutableAssign(baseCorrectParams, { username: 'super'.repeat(50) }) |
113 | 113 | ||
114 | await makePostBodyRequest({ url: server.url, path, token: server.accessToken, fields }) | 114 | await makePostBodyRequest({ url: server.url, path, token: server.accessToken, fields }) |
115 | }) | 115 | }) |
@@ -560,7 +560,7 @@ describe('Test users API validators', function () { | |||
560 | }) | 560 | }) |
561 | 561 | ||
562 | it('Should fail with a too long username', async function () { | 562 | it('Should fail with a too long username', async function () { |
563 | const fields = immutableAssign(baseCorrectParams, { username: 'super'.repeat(11) }) | 563 | const fields = immutableAssign(baseCorrectParams, { username: 'super'.repeat(50) }) |
564 | 564 | ||
565 | await makePostBodyRequest({ url: server.url, path: registrationPath, token: server.accessToken, fields }) | 565 | await makePostBodyRequest({ url: server.url, path: registrationPath, token: server.accessToken, fields }) |
566 | }) | 566 | }) |