Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
b4c02643
Commit
b4c02643
authored
Jun 04, 2002
by
bbaetz%student.usyd.edu.au
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 143574 - taint errors with alternate formats. Also make data/template
writable for non webservergroup users. r=myk, justdave
parent
a162877b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
2 deletions
+14
-2
checksetup.pl
checksetup.pl
+5
-1
globals.pl
globals.pl
+9
-1
No files found.
checksetup.pl
View file @
b4c02643
...
@@ -841,6 +841,8 @@ END
...
@@ -841,6 +841,8 @@ END
if
(
-
e
'data/template'
)
{
if
(
-
e
'data/template'
)
{
unless
(
-
d
'data/template'
&&
-
e
'data/template/.lastRebuild'
&&
unless
(
-
d
'data/template'
&&
-
e
'data/template/.lastRebuild'
&&
(
stat
(
'data/template/.lastRebuild'
))[
9
]
>=
$lastTemplateParamChange
)
{
(
stat
(
'data/template/.lastRebuild'
))[
9
]
>=
$lastTemplateParamChange
)
{
print
"Removing existing compiled templates ...\n"
;
# If File::Path::rmtree reported errors, then I'd use that
# If File::Path::rmtree reported errors, then I'd use that
use
File::
Find
;
use
File::
Find
;
sub
remove
{
sub
remove
{
...
@@ -904,6 +906,8 @@ END
...
@@ -904,6 +906,8 @@ END
}
}
{
{
print
"Precompiling templates ...\n"
;
use
File::
Find
;
use
File::
Find
;
use
Cwd
;
use
Cwd
;
...
@@ -1089,7 +1093,7 @@ if ($my_webservergroup) {
...
@@ -1089,7 +1093,7 @@ if ($my_webservergroup) {
my
$gid
=
(
split
" "
,
$(
)[
0
];
my
$gid
=
(
split
" "
,
$(
)[
0
];
fixPerms
(
'.htaccess'
,
$<
,
$gid
,
022
);
# glob('*') doesn't catch dotfiles
fixPerms
(
'.htaccess'
,
$<
,
$gid
,
022
);
# glob('*') doesn't catch dotfiles
fixPerms
(
'data/.htaccess'
,
$<
,
$gid
,
022
);
fixPerms
(
'data/.htaccess'
,
$<
,
$gid
,
022
);
fixPerms
(
'data/template'
,
$<
,
$gid
,
0
22
,
1
);
fixPerms
(
'data/template'
,
$<
,
$gid
,
0
00
,
1
);
# webserver will write to these
fixPerms
(
'data/webdot/.htaccess'
,
$<
,
$gid
,
022
);
fixPerms
(
'data/webdot/.htaccess'
,
$<
,
$gid
,
022
);
fixPerms
(
'data/params'
,
$<
,
$gid
,
011
);
fixPerms
(
'data/params'
,
$<
,
$gid
,
011
);
fixPerms
(
'*'
,
$<
,
$gid
,
022
);
fixPerms
(
'*'
,
$<
,
$gid
,
022
);
...
...
globals.pl
View file @
b4c02643
...
@@ -1680,7 +1680,15 @@ sub GetOutputFormats {
...
@@ -1680,7 +1680,15 @@ sub GetOutputFormats {
# Loop over each file in the sub-directory looking for format files
# Loop over each file in the sub-directory looking for format files
# (files whose name looks like SCRIPT-FORMAT.EXT.tmpl).
# (files whose name looks like SCRIPT-FORMAT.EXT.tmpl).
foreach
my
$file
(
@files
)
{
foreach
my
$file
(
@files
)
{
if
(
$file
=~
/^\Q$script\E-(.+)\.(.+)\.(tmpl)$/
)
{
if
(
$file
=~
/^\Q$script\E-(.+)\.(.+)\.tmpl$/
)
{
# This must be a valid file
# If an attacker could add a previously unused format
# type to trick us into running it, then they could just
# change an existing one...
# (This implies that running without a webservergroup is
# insecure, but that is the case anyway)
trick_taint
(
$file
);
$formats
->
{
$1
}
=
{
$formats
->
{
$1
}
=
{
'template'
=>
$file
,
'template'
=>
$file
,
'extension'
=>
$2
,
'extension'
=>
$2
,
...
...
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