Skip to content

Commit

Permalink
Merge pull request #1041 from CVEProject/srl-1020-1021
Browse files Browse the repository at this point in the history
Resolves #1020 #1021 corrects information about username length and character …
  • Loading branch information
jdaigneau5 authored Mar 1, 2023
2 parents 60f4cce + 6418a7b commit d9bd72a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion api-docs/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -2715,7 +2715,7 @@
"newUsername": {
"in": "query",
"name": "new_username",
"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 -_@.",
"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 -_@.",
"required": false,
"schema": {
"type": "string"
Expand Down
2 changes: 1 addition & 1 deletion schemas/user/create-user-request.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"properties": {
"username": {
"type": "string",
"description": "Preferably the user's email address. Must be 3-50 characters in length; allowed characters are alphanumberic and -_@."
"description": "Preferably the user's email address. Must be 3-128 characters in length; allowed characters are alphanumeric and -_@."
},
"name": {
"type": "object",
Expand Down
2 changes: 1 addition & 1 deletion src/controller/org.controller/org.middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function parseError (req, res, next) {
function isValidUsername (val) {
const value = val.match(/^[A-Za-z0-9\-_@.]{3,128}$/)
if (value == null) {
throw new Error('Username should be 3-128 characters. Allowed characters are alphanumberic and -_@.')
throw new Error('Username should be 3-128 characters. Allowed characters are alphanumeric and -_@.')
}
return true
}
Expand Down
2 changes: 1 addition & 1 deletion src/swagger.js
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ const doc = {
newUsername: {
in: 'query',
name: 'new_username',
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 -_@.',
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 -_@.',
required: false,
schema: {
type: 'string'
Expand Down

0 comments on commit d9bd72a

Please sign in to comment.