Skip to content

Commit

Permalink
qvm-console-dispvm: drop wrong validation of trusted input
Browse files Browse the repository at this point in the history
The previous code didn't allow "." in the VM name.  Input is trusted,
and besides invalid VM names will be rejected as nonexistent or
unstartable.
  • Loading branch information
DemiMarie committed Nov 14, 2024
1 parent def2249 commit 51aeab6
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions qvm-tools/qvm-console-dispvm
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ fi

QREXEC_REQUESTED_TARGET="$1"

[[ "$QREXEC_REQUESTED_TARGET" =~ ^[A-Za-z][A-Za-z0-9_-]*$ ]] || { printf 'Invalid qube name %q\n' "$QREXEC_REQUESTED_TARGET">&2; exit 1; }

if "$do_start"; then
msg='cannot be started'
qvm-start --skip-if-running -- "$QREXEC_REQUESTED_TARGET"
Expand Down

0 comments on commit 51aeab6

Please sign in to comment.