Commit baa70c5a authored by Leigh Stoller's avatar Leigh Stoller

Oops, old change; make sure the regex from table_regex are properly

anchored (force them to be).
parent f6ec1f49
......@@ -114,6 +114,13 @@ function TBcheck_dbslot($token, $table, $column, $flag = 0)
"$token, $table, $column", 1);
}
# Make sure the regex is anchored. Its a mistake not to be!
if (substr($check, 0, 1) != "^")
$check = "^" . $check;
if (substr($check, -1, 1) != "\$")
$check = $check . "\$";
if (!preg_match("/$check/", "$token")) {
$DBFieldErrstr = "Illegal characters";
return 0;
......
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