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-stable
Commits
9a70fc25
Commit
9a70fc25
authored
Oct 08, 2003
by
Leigh B. Stoller
Browse files
Add more sanity checking to arguments passed to shell command, since
this page is open to the world.
parent
6ee42b31
Changes
1
Hide whitespace changes
Inline
Side-by-side
www/spewrpmtar.php3
View file @
9a70fc25
...
...
@@ -26,6 +26,7 @@ if (!isset($nodeid) ||
strcmp
(
$nodeid
,
""
)
==
0
)
{
SPITERROR
(
400
,
"You must provide a node ID."
);
}
$nodeid
=
addslashes
(
$nodeid
);
if
(
!
isset
(
$file
)
||
strcmp
(
$file
,
""
)
==
0
)
{
SPITERROR
(
400
,
"You must provide an filename."
);
...
...
@@ -81,6 +82,12 @@ function SPEWCLEANUP()
ignore_user_abort
(
1
);
register_shutdown_function
(
"SPEWCLEANUP"
);
#
# MUST DO THIS!
#
$nodeid
=
escapeshellarg
(
$nodeid
);
$file
=
escapeshellarg
(
$file
);
#
# Run once with just the verify option to see if the file exists.
# Then do it for real, spitting out the data. Sure, the user could
...
...
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