Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
marcus-lodspeakr
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
uib-ub
Spesialsamlingene
marcus-lodspeakr
Merge requests
!5
add check for static dir and static/img
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
add check for static dir and static/img
lodspeakr-issue-6
into
master
Overview
2
Commits
5
Pipelines
0
Changes
1
Merged
Oyvind.Gjesdal
requested to merge
lodspeakr-issue-6
into
master
3 years ago
Overview
2
Commits
5
Pipelines
0
Changes
1
Expand
0
0
Merge request reports
Viewing commit
6216e485
Prev
Next
Show latest version
1 file
+
2
−
2
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
6216e485
if outside either paths, send404
· 6216e485
oyvind Gjesdal
authored
3 years ago
classes/modules/staticModule.php
+
2
−
2
Options
@@ -30,8 +30,8 @@ class StaticModule extends abstractModule{
$imgdir
=
realpath
(
$conf
[
'static'
][
'directory'
]
.
"img"
);
$resourcepath
=
realpath
(
$conf
[
'static'
][
'directory'
]
.
$file
);
// static resources should be in static or img dir (img may be symlinked)
if
(
not
(
strpos
(
$resourcepath
,
$staticdir
)
=
==
0
or
strpos
(
$resourcepath
,
$imgdir
)
=
==
0
)
)
{
// static resources should be in static or img dir (img may be symlinked
, check realpath of img as well
)
if
(
strpos
(
$resourcepath
,
$staticdir
)
!
==
0
and
strpos
(
$resourcepath
,
$imgdir
)
!
==
0
)
{
HTTPStatus
::
send404
(
$file
);
// send404 calls exit();//
}
$filenamearray
=
explode
(
"."
,
$file
);
Loading