Skip to content

Exclude coraza from scanning HTTP POST requests involving multipart content type data #927

Closed Answered by M4tteoP
Barnoux asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @Barnoux,
Mind that the ctl actions are part of the no-disruptive actions. Because of that , in a chained rule, these actions are executed whenever the individual rule of the action is reached and matched, not when the whole rule chain is matched.
I would refactor your rule as something like this:

SecRule REQUEST_METHOD "@streq POST" \
    "id:1007,\
    phase:1,\
    pass,\
    log,\
    t:none,\
    msg:'file uploads will not be buffered and processed by Coraza on /api/sends/*',\
    rev:'1',\
    chain"
    SecRule REQUEST_URI "@beginsWith /api/sends/" \
        "t:none,chain"
        SecRule REQUEST_HEADERS:Content-Type "^multipart/form-data" \
            "t:lowercase, ctl:request…

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@M4tteoP
Comment options

@jptosso
Comment options

@Barnoux
Comment options

@M4tteoP
Comment options

Answer selected by Barnoux
@Barnoux
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants