DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25414>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25414 capture malformed <Limit directives Summary: capture malformed <Limit directives Product: Apache httpd-2.0 Version: 2.1-HEAD Platform: Other URL: http://marc.theaimsgroup.com/?l=apache-httpd- dev&m=107098418919115&w=2 OS/Version: All Status: UNCONFIRMED Severity: Normal Priority: Other Component: Core AssignedTo: bugs@httpd.apache.org ReportedBy: geoff@apache.org <Limit> and <LimitExcept> do not require a closing '>' in the initial container. that is <Limit GET POST ... </Limit> is currently accepted as valid. PatchAvailable. Index: server/core.c =================================================================== RCS file: /home/cvspublic/httpd-2.0/server/core.c,v retrieving revision 1.252 diff -u -r1.252 core.c --- server/core.c 21 Nov 2003 15:02:04 -0000 1.252 +++ server/core.c 10 Dec 2003 17:16:59 -0000 @@ -1552,11 +1552,21 @@ return NULL; } +/* + * Report a missing-'>' syntax error. + */ +static char *unclosed_directive(cmd_parms *cmd) +{ + return apr_pstrcat(cmd->pool, cmd->cmd->name, + "> directive missing closing '>'", NULL); +} + AP_CORE_DECLARE_NONSTD(const char *) ap_limit_section(cmd_parms *cmd, void *dummy, const char *arg) { - const char *limited_methods = ap_getword(cmd->pool, &arg, '>'); + const char *endp = ap_strrchr_c(arg, '>'); + const char *limited_methods; void *tog = cmd->cmd->cmd_data; apr_int64_t limited = 0; const char *errmsg; @@ -1566,6 +1576,12 @@ return err; } + if (endp == NULL) { + return unclosed_directive(cmd); + } + + limited_methods = apr_pstrndup(cmd->pool, arg, endp - arg); + while (limited_methods[0]) { char *method = ap_getword_conf(cmd->pool, &limited_methods); int methnum; @@ -1609,15 +1625,6 @@ #else #define USE_ICASE 0 #endif - -/* - * Report a missing-'>' syntax error. - */ -static char *unclosed_directive(cmd_parms *cmd) -{ - return apr_pstrcat(cmd->pool, cmd->cmd->name, - "> directive missing closing '>'", NULL); -} static const char *dirsection(cmd_parms *cmd, void *mconfig, const char *arg) { --------------------------------------------------------------------- To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org For additional commands, e-mail: bugs-help@httpd.apache.org