Commit dd45d673 authored by Gérard Huet's avatar Gérard Huet

Merge branch 'fix-vulnerability' into 'master'

Fix a critical vulnerability of the corpus manager

See merge request !10
parents 215d0e16 15477c18
......@@ -266,12 +266,19 @@ module Make (Loc : Location) : S = struct
| Manager -> "manager"
]
;
value permission_of_string = fun
[ "annotator" -> Annotator
| "manager" -> Manager
| _ -> Reader
value restrict_permission perm =
match Html.target with
[ Html.Server -> Reader
| Html.Simputer | Html.Computer | Html.Station -> perm
]
;
value permission_of_string s = s |> to_perm |> restrict_permission
where to_perm = fun
[ "annotator" -> Annotator
| "manager" -> Manager
| _ -> Reader
]
;
value url dir permission sentence =
let analysis = Sentence.analysis sentence in
let env =
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment