Commit f80b3901 authored by Leigh Stoller's avatar Leigh Stoller

Fix to sanity check of the vnode name.

parent cd65ef0f
......@@ -290,6 +290,10 @@ function TBvalid_node_id($token) {
return TBcheck_dbslot($token, "nodes", "node_id",
TBDB_CHECKDBSLOT_WARN|TBDB_CHECKDBSLOT_ERROR);
}
function TBvalid_vnode_id($token) {
return TBcheck_dbslot($token, "virt_nodes", "vname",
TBDB_CHECKDBSLOT_WARN|TBDB_CHECKDBSLOT_ERROR);
}
function TBvalid_imageid($token) {
return TBcheck_dbslot($token, "images", "imageid",
TBDB_CHECKDBSLOT_WARN|TBDB_CHECKDBSLOT_ERROR);
......
<?php
#
# EMULAB-COPYRIGHT
# Copyright (c) 2005 University of Utah and the Flux Group.
# Copyright (c) 2005, 2006 University of Utah and the Flux Group.
# All rights reserved.
#
include("defs.php3");
......@@ -54,7 +54,7 @@ if (! TBvalid_linklanname($linklan)) {
if (!isset($vnode) || strcmp($vnode, "") == 0) {
USERERROR("You must provide a node name.", 1);
}
if (! TBvalid_node_id($vnode)) {
if (! TBvalid_vnode_id($vnode)) {
PAGEARGERROR("$vnode contains invalid characters!");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment