Skip to content
Snippets Groups Projects
Commit 7c93363d authored by David Paul's avatar David Paul
Browse files

Fix check that user_id is alphanumeric

parent 50e0fa90
No related branches found
No related tags found
No related merge requests found
...@@ -62,7 +62,7 @@ parse_params() { ...@@ -62,7 +62,7 @@ parse_params() {
[[ -z "${context-}" ]] && die "Missing required parameter: context" [[ -z "${context-}" ]] && die "Missing required parameter: context"
[[ -z "${user-}" ]] && die "Missing required parameter: user" [[ -z "${user-}" ]] && die "Missing required parameter: user"
[[ "${context-}" =~ ^[[:alnum:]]+$ ]] || die "context must be alphanumeric only" [[ "${context-}" =~ ^[[:alnum:]]+$ ]] || die "context must be alphanumeric only"
[[ "${user-}" =~ ^[[:alnum:]]]+$ ]] || die "user must be alphanumeric only" [[ "${user-}" =~ ^[[:alnum:]]+$ ]] || die "user must be alphanumeric only"
[[ ${#args[@]} -eq 0 ]] && die "No command specified" [[ ${#args[@]} -eq 0 ]] && die "No command specified"
return 0 return 0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment