Skip to content

Commit d9bd72a

Browse files
authored
Merge pull request CVEProject#1041 from CVEProject/srl-1020-1021
Resolves CVEProject#1020 CVEProject#1021 corrects information about username length and character …
2 parents 60f4cce + 6418a7b commit d9bd72a

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

api-docs/openapi.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2715,7 +2715,7 @@
27152715
"newUsername": {
27162716
"in": "query",
27172717
"name": "new_username",
2718-
"description": "The new username for the user, preferably the user's email address. Must be 3-50 characters in length; allowed characters are alphanumberic and -_@.",
2718+
"description": "The new username for the user, preferably the user's email address. Must be 3-128 characters in length; allowed characters are alphanumeric and -_@.",
27192719
"required": false,
27202720
"schema": {
27212721
"type": "string"

schemas/user/create-user-request.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"properties": {
55
"username": {
66
"type": "string",
7-
"description": "Preferably the user's email address. Must be 3-50 characters in length; allowed characters are alphanumberic and -_@."
7+
"description": "Preferably the user's email address. Must be 3-128 characters in length; allowed characters are alphanumeric and -_@."
88
},
99
"name": {
1010
"type": "object",

src/controller/org.controller/org.middleware.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ function parseError (req, res, next) {
5959
function isValidUsername (val) {
6060
const value = val.match(/^[A-Za-z0-9\-_@.]{3,128}$/)
6161
if (value == null) {
62-
throw new Error('Username should be 3-128 characters. Allowed characters are alphanumberic and -_@.')
62+
throw new Error('Username should be 3-128 characters. Allowed characters are alphanumeric and -_@.')
6363
}
6464
return true
6565
}

src/swagger.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ const doc = {
362362
newUsername: {
363363
in: 'query',
364364
name: 'new_username',
365-
description: 'The new username for the user, preferably the user\'s email address. Must be 3-50 characters in length; allowed characters are alphanumberic and -_@.',
365+
description: 'The new username for the user, preferably the user\'s email address. Must be 3-128 characters in length; allowed characters are alphanumeric and -_@.',
366366
required: false,
367367
schema: {
368368
type: 'string'

0 commit comments

Comments
 (0)