Skip to content
GitLab
Menu
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
73fe5ec9
Commit
73fe5ec9
authored
Nov 14, 2003
by
Leigh B. Stoller
Browse files
Minor change to regex; allow .txt too.
parent
ffbc29d7
Changes
3
Show whitespace changes
Inline
Side-by-side
www/doc/docwrapper.php3
View file @
73fe5ec9
...
...
@@ -30,7 +30,7 @@ if (!$printable) {
#
# Need to sanity check the path! Allow only [word].{html,txt} files
#
if
(
!
preg_match
(
"/^[\w
-
]+\.(html|txt)$/"
,
$docname
))
{
if
(
!
preg_match
(
"/^[
-
\w]+\.(html|txt)$/"
,
$docname
))
{
USERERROR
(
"Illegal document name:
$docname
!"
,
1
);
}
...
...
www/docwrapper.php3
View file @
73fe5ec9
...
...
@@ -28,7 +28,7 @@ if (!$printable) {
#
# Need to sanity check the path! Allow only [word].html files
#
if
(
!
preg_match
(
"/^[\w
-
]+\.html$/"
,
$docname
))
{
if
(
!
preg_match
(
"/^[
-
\w]+\.
(
html
|txt)
$/"
,
$docname
))
{
USERERROR
(
"Illegal document name:
$docname
!"
,
1
);
}
...
...
www/tutorial/docwrapper.php3
View file @
73fe5ec9
...
...
@@ -30,7 +30,7 @@ if (!$printable) {
#
# Need to sanity check the path! Allow only [word].html files
#
if
(
!
preg_match
(
"/^[\w
-
]+\.html$/"
,
$docname
))
{
if
(
!
preg_match
(
"/^[
-
\w]+\.
(
html
|txt)
$/"
,
$docname
))
{
USERERROR
(
"Illegal document name:
$docname
!"
,
1
);
}
...
...
Write
Preview
Supports
Markdown
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