mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 19:24:29 +03:00
Fixes a few typos in some error messages when we are over the limits.
This commit is contained in:
@@ -1100,6 +1100,12 @@ apr_status_t multipart_cleanup(modsec_rec *msr) {
|
||||
for(i = 0; i < msr->mpd->parts->nelts; i++) {
|
||||
if (parts[i]->type == MULTIPART_FILE) {
|
||||
if (parts[i]->tmp_file_name != NULL) {
|
||||
/* make sure it is closed first */
|
||||
if (parts[i]->tmp_file_fd > 0) {
|
||||
close(parts[i]->tmp_file_fd);
|
||||
parts[i]->tmp_file_fd = -1;
|
||||
}
|
||||
|
||||
if (unlink(parts[i]->tmp_file_name) < 0) {
|
||||
msr_log(msr, 1, "Multipart: Failed to delete file (part) \"%s\" because %d(%s)",
|
||||
log_escape(msr->mp, parts[i]->tmp_file_name), errno, strerror(errno));
|
||||
@@ -1122,6 +1128,12 @@ apr_status_t multipart_cleanup(modsec_rec *msr) {
|
||||
if ((parts[i]->type == MULTIPART_FILE)&&(parts[i]->tmp_file_size == 0)) {
|
||||
/* Delete empty file. */
|
||||
if (parts[i]->tmp_file_name != NULL) {
|
||||
/* make sure it is closed first */
|
||||
if (parts[i]->tmp_file_fd > 0) {
|
||||
close(parts[i]->tmp_file_fd);
|
||||
parts[i]->tmp_file_fd = -1;
|
||||
}
|
||||
|
||||
if (unlink(parts[i]->tmp_file_name) < 0) {
|
||||
msr_log(msr, 1, "Multipart: Failed to delete empty file (part) \"%s\" because %d(%s)",
|
||||
log_escape(msr->mp, parts[i]->tmp_file_name), errno, strerror(errno));
|
||||
@@ -1138,6 +1150,12 @@ apr_status_t multipart_cleanup(modsec_rec *msr) {
|
||||
const char *new_filename = NULL;
|
||||
const char *new_basename = NULL;
|
||||
|
||||
/* make sure it is closed first */
|
||||
if (parts[i]->tmp_file_fd > 0) {
|
||||
close(parts[i]->tmp_file_fd);
|
||||
parts[i]->tmp_file_fd = -1;
|
||||
}
|
||||
|
||||
new_basename = file_basename(msr->mp, parts[i]->tmp_file_name);
|
||||
if (new_basename == NULL) return -1;
|
||||
new_filename = apr_psprintf(msr->mp, "%s/%s", msr->txcfg->upload_dir,
|
||||
|
Reference in New Issue
Block a user