Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emulab
emulab-devel
Commits
027984f5
Commit
027984f5
authored
Oct 18, 2001
by
Leigh B. Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix up a couple of eregs.
parent
1ef5ed02
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
www/newimageid.php3
www/newimageid.php3
+3
-3
www/newosid.php3
www/newosid.php3
+3
-3
No files found.
www/newimageid.php3
View file @
027984f5
...
@@ -56,16 +56,16 @@ if (isset($loadaddr) &&
...
@@ -56,16 +56,16 @@ if (isset($loadaddr) &&
#
#
# Check ID and others for sillyness.
# 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 "
.
USERERROR
(
"The ImageID must consist of alphanumeric characters and "
.
"dash, dot, or underscore!"
,
1
);
"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
);
USERERROR
(
"The path contains invalid characters!"
,
1
);
}
}
if
(
isset
(
$loadaddr
)
&&
if
(
isset
(
$loadaddr
)
&&
!
ereg
(
"^[
\.
0-9]+$"
,
$loadaddr
))
{
!
ereg
(
"^[0-9
\.
]+$"
,
$loadaddr
))
{
USERERROR
(
"The load address contains invalid characters!"
,
1
);
USERERROR
(
"The load address contains invalid characters!"
,
1
);
}
}
...
...
www/newosid.php3
View file @
027984f5
...
@@ -48,7 +48,7 @@ if (isset($os_version) &&
...
@@ -48,7 +48,7 @@ if (isset($os_version) &&
#
#
# Check osid for sillyness.
# 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 "
.
USERERROR
(
"The OSID must consist of alphanumeric characters and "
.
"dash, dot, or underscore!"
,
1
);
"dash, dot, or underscore!"
,
1
);
}
}
...
@@ -58,7 +58,7 @@ if (isset($os_path)) {
...
@@ -58,7 +58,7 @@ if (isset($os_path)) {
unset
(
$os_path
);
unset
(
$os_path
);
}
}
else
{
else
{
if
(
!
ereg
(
"^[
\.
-_a-zA-Z0-9\/]+$"
,
$os_path
))
{
if
(
!
ereg
(
"^[-_a-zA-Z0-9\/
\.
]+$"
,
$os_path
))
{
USERERROR
(
"The path contains invalid characters!"
,
1
);
USERERROR
(
"The path contains invalid characters!"
,
1
);
}
}
}
}
...
@@ -66,7 +66,7 @@ if (isset($os_path)) {
...
@@ -66,7 +66,7 @@ if (isset($os_path)) {
if
(
isset
(
$os_version
))
{
if
(
isset
(
$os_version
))
{
if
(
strcmp
(
$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
);
USERERROR
(
"The version string contains invalid characters!"
,
1
);
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment