Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
942443cc
Commit
942443cc
authored
Oct 30, 2003
by
Leigh B. Stoller
Browse files
Add better regex to check the pathname of the local NS file and spit
proper error.
parent
fe350a58
Changes
1
Hide whitespace changes
Inline
Side-by-side
www/beginexp.php3
View file @
942443cc
...
...
@@ -621,6 +621,16 @@ if ($speclocal) {
# Do not allow anything outside of special dirs. I do not think there
# is a security worry, but good to enforce it anyway.
#
if
(
!
preg_match
(
"/^([-\@\w\.\/]+)$/"
,
$exp_localnsfile
))
{
if
(
isset
(
$syntax
))
{
echo
"<h3 style='color: #f00'>Error:
\n
"
.
"Pathname includes illegal characters!</h3>
\n
"
;
die
(
""
);
}
else
{
RESPIT
(
"NS File"
,
"Pathname includes illegal characters"
);
}
}
if
(
!
ereg
(
"^
$TBPROJ_DIR
/.*"
,
$exp_localnsfile
)
&&
!
ereg
(
"^
$TBUSER_DIR
/.*"
,
$exp_localnsfile
)
&&
!
ereg
(
"^
$TBGROUP_DIR
/.*"
,
$exp_localnsfile
))
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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