security: fix critical/high auth, idor, races and persistence

This commit is contained in:
Naeel
2026-04-10 19:41:59 +03:00
parent e9a26f7975
commit a5e9bfb15c
11 changed files with 868 additions and 505 deletions
+5 -1
View File
@@ -147,7 +147,11 @@ func extractAction(req *http.Request) string {
switch protocol {
case AwsJsonProtocol:
action := req.Header.Get("X-Amz-Target")
return strings.Split(action, ".")[1]
parts := strings.SplitN(action, ".", 2)
if len(parts) != 2 || parts[1] == "" {
return ""
}
return parts[1]
case AwsQueryProtocol:
return req.FormValue("Action")
}