Commit ac45a415 authored by Leigh Stoller's avatar Leigh Stoller

Add TBvalid_URN(), which is just a basic regex check to apply before

passing out to the shell.
parent b177bbac
<?php
#
# Copyright (c) 2000-2017 University of Utah and the Flux Group.
# Copyright (c) 2000-2019 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -374,4 +374,9 @@ function TBvalid_node_type($token) {
return TBcheck_dbslot($token, "virt_nodes", "type",
TBDB_CHECKDBSLOT_WARN|TBDB_CHECKDBSLOT_ERROR);
}
# Not a real check, just a cursory check for illegal chars.
function TBvalid_URN($token) {
return TBcheck_dbslot($token, "projects", "nonlocal_id",
TBDB_CHECKDBSLOT_WARN|TBDB_CHECKDBSLOT_ERROR);
}
?>
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