Skip to content

Commit

Permalink
Make regex stricter
Browse files Browse the repository at this point in the history
  • Loading branch information
eXenon committed Nov 10, 2023
1 parent 201e7b4 commit 4e6547c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cs_api_core/cs_api_core.ml
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ let parse_s3_signature_request ~body =

let parse_s3_response ~body =
try
let key_extractor = Str.regexp "<.*Key.*>\\([^<>]*\\)</.*Key.*>" in
let key_extractor = Str.regexp "<Key.*>\\([^<>]*\\)</Key>" in
let _ = Str.search_forward key_extractor body 0 in
Ok (Str.matched_group 1 body)
with
Expand Down

0 comments on commit 4e6547c

Please sign in to comment.