Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
walint
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
hub
walint
Commits
7b079ff7
Commit
7b079ff7
authored
3 years ago
by
stuebinm
Browse files
Options
Downloads
Patches
Plain Diff
reject map urls starting with /_/
parent
3a3cb19e
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/Properties.hs
+6
-3
6 additions, 3 deletions
lib/Properties.hs
with
6 additions
and
3 deletions
lib/Properties.hs
+
6
−
3
View file @
7b079ff7
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE OverloadedStrings #-}
...
@@ -176,9 +177,11 @@ checkLayerProperty p@(Property name _value) = case name of
...
@@ -176,9 +177,11 @@ checkLayerProperty p@(Property name _value) = case name of
"allowApi"
->
isForbidden
"allowApi"
->
isForbidden
"exitUrl"
->
do
"exitUrl"
->
do
forbidEmptyLayer
forbidEmptyLayer
unwrapLink
p
$
\
link
->
if
"/"
`
isPrefixOf
`
link
unwrapLink
p
$
\
link
->
if
then
dependsOn
$
MapLink
link
|
"/_/"
`
isPrefixOf
`
link
->
else
unwrapPath
link
(
dependsOn
.
LocalMap
)
complain
"absolute map links (i.e. links starting with '/_/') are disallowed."
|
"/@/"
`
isPrefixOf
`
link
->
dependsOn
$
MapLink
link
-- TODO
|
otherwise
->
unwrapPath
link
(
dependsOn
.
LocalMap
)
"startLayer"
->
do
"startLayer"
->
do
forbidEmptyLayer
forbidEmptyLayer
layer
<-
askContext
layer
<-
askContext
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment