Skip to content
Snippets Groups Projects
Commit a9cdd909 authored by jc3's avatar jc3
Browse files

added string check on name param

parent c9b68206
No related branches found
No related tags found
No related merge requests found
......@@ -41,6 +41,16 @@ module.exports = query_sanitizer = ( req_query ) => {
}
}
if( query_params.name ){
let name = query_params.name
if( typeof name !== "string" ){
response.code = 400
response.string =
`name must be a string`
}
}
let params = Object.assign( base_params, query_params )
return { params, response }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment