owasp-modsecurity / owasp-modsecurity/ModSecurity

[modsecurity.conf-recommended] align processing on request & response for json

Open
#3,175 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

2.x config
Dominant language
C++
Stars
9.8k
Forks
1.8k
Avg merge
2h 46m
Merged PRs (30d)
1

Description

I think this issue might be relevant in this context also: https://github.com/corazawaf/coraza/issues/1086.

Adapting @YvesZelros's issue here:

The modsecurity.conf-recommended enable JSON request body processor but don't parse JSON on response.
I propose align request & response configuration by adding application/json on SecResponseBodyMimeType:
SecResponseBodyMimeType text/plain text/html text/xml application/json

What do you think?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open modsecurity.conf-recommended and compare the JSON request body processor near line 29 with SecResponseBodyMimeType near line 177. Review the linked Coraza issue for context and verify the proposed response MIME configuration. Done when application/json is included in the response configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
json
Domain
security
Issue type
Feature
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.