Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions server/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -3921,12 +3921,13 @@ static const char *set_limit_xml_req_body(cmd_parms *cmd, void *conf_,
core_dir_config *conf = conf_;
apr_uint64_t max = AP_MAX_LIMIT_XML_BODY;
apr_off_t limit;
char *errp;
apr_status_t rv;

if (APR_SUCCESS != apr_strtoff(&limit, arg, &errp, 10)) {
rv = ap_size_parameter_parse(arg, &limit);
if (rv == APR_ERANGE) {
return "LimitXMLRequestBody argument is not parsable.";
}
if (*errp || limit < 0) {
if (rv != APR_SUCCESS || limit < 0) {
return "LimitXMLRequestBody requires a non-negative integer.";
}

Expand Down
2 changes: 1 addition & 1 deletion test/modules/core/test_012_config_off_t.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# size and time directives parsed with ap_size_parameter_parse(), which can
# not be negative
DIRECTIVES = [
"LimitRequestBody",
"LimitRequestBody", "LimitXMLRequestBody",
"ScriptLogLength", "ScriptLogBuffer",
"CacheMinFileSize", "CacheMaxFileSize", "CacheReadSize", "CacheReadTime",
"CacheSocacheMaxTime", "CacheSocacheMinTime", "CacheSocacheReadSize",
Expand Down
Loading