Commit 027984f5 authored by Leigh Stoller's avatar Leigh Stoller

Fix up a couple of eregs.

parent 1ef5ed02
......@@ -56,16 +56,16 @@ if (isset($loadaddr) &&
#
# Check ID and others for sillyness.
#
if (! ereg("^[\.-_a-zA-Z0-9]+$", $imageid)) {
if (! ereg("^[-_a-zA-Z0-9\.]+$", $imageid)) {
USERERROR("The ImageID must consist of alphanumeric characters and ".
"dash, dot, or underscore!", 1);
}
if (! ereg("^[\.-_a-zA-Z0-9\/]+$", $path)) {
if (! ereg("^[-_a-zA-Z0-9\/\.]+$", $path)) {
USERERROR("The path contains invalid characters!", 1);
}
if (isset($loadaddr) &&
!ereg("^[\.0-9]+$", $loadaddr)) {
!ereg("^[0-9\.]+$", $loadaddr)) {
USERERROR("The load address contains invalid characters!", 1);
}
......
......@@ -48,7 +48,7 @@ if (isset($os_version) &&
#
# Check osid for sillyness.
#
if (! ereg("^[\.-_a-zA-Z0-9]+$", $osid)) {
if (! ereg("^[-_a-zA-Z0-9\.]+$", $osid)) {
USERERROR("The OSID must consist of alphanumeric characters and ".
"dash, dot, or underscore!", 1);
}
......@@ -58,7 +58,7 @@ if (isset($os_path)) {
unset($os_path);
}
else {
if (! ereg("^[\.-_a-zA-Z0-9\/]+$", $os_path)) {
if (! ereg("^[-_a-zA-Z0-9\/\.]+$", $os_path)) {
USERERROR("The path contains invalid characters!", 1);
}
}
......@@ -66,7 +66,7 @@ if (isset($os_path)) {
if (isset($os_version)) {
if (strcmp($os_version, "") &&
! ereg("^[\.-_a-zA-Z0-9]+$", $os_version)) {
! ereg("^[-_a-zA-Z0-9\.]+$", $os_version)) {
USERERROR("The version string contains invalid characters!", 1);
}
}
......
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