Skip to content

sanitiseMatchedBytes only works with 1 digit parameters #2472

Open
@marcstern

Description

@marcstern

sanitiseMatchedBytes:5/8 => OK
sanitiseMatchedBytes:10/2 => not accepted => sanitizes the whole string

In msre_action_sanitizeMatchedBytes_init():
if (action->param != NULL && strlen(action->param) == 3)
should be
if (action->param != NULL && strlen(action->param) >= 3)

Metadata

Metadata

Assignees

Labels

2.xRelated to ModSecurity version 2.xenhancement

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions