mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-14 05:45:59 +03:00
Check if the MP header contains invalid character
This commit is contained in:
parent
935e68c816
commit
f27c85cf47
@ -424,6 +424,16 @@ static int multipart_process_part_header(modsec_rec *msr, char **error_msg) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* check if multipart header contains any invalid characters */
|
||||
char *ch = header_name;
|
||||
while(*ch != '\0') {
|
||||
if (*ch < 33 || *ch > 126) {
|
||||
*error_msg = apr_psprintf(msr->mp, "Multipart: Invalid part header (contains invalid character).");
|
||||
return -1;
|
||||
}
|
||||
ch++;
|
||||
}
|
||||
|
||||
/* extract the value value */
|
||||
data++;
|
||||
while((*data == '\t') || (*data == ' ')) data++;
|
||||
|
Loading…
x
Reference in New Issue
Block a user