mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 19:24:29 +03:00
Add check for evasion using double quote inside multipart boundary.
This commit is contained in:
@@ -567,6 +567,11 @@ int multipart_init(modsec_rec *msr, char **error_msg) {
|
|||||||
/* Quoted. */
|
/* Quoted. */
|
||||||
msr->mpd->boundary = apr_pstrndup(msr->mp, b + 1, len - 2);
|
msr->mpd->boundary = apr_pstrndup(msr->mp, b + 1, len - 2);
|
||||||
msr->mpd->flag_boundary_quoted = 1;
|
msr->mpd->flag_boundary_quoted = 1;
|
||||||
|
|
||||||
|
if (strstr(msr->mpd->boundary, "\"") != NULL) {
|
||||||
|
*error_msg = apr_psprintf(msr->mp, "Invalid boundary (quote).");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
/* Not quoted. */
|
/* Not quoted. */
|
||||||
msr->mpd->boundary = apr_pstrdup(msr->mp, b);
|
msr->mpd->boundary = apr_pstrdup(msr->mp, b);
|
||||||
|
Reference in New Issue
Block a user