You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by jamie rishaw <ja...@playboy.com> on 2000/11/06 17:46:47 UTC

mod_access/6801: "Allow from" does not support mixing of notations

>Number:         6801
>Category:       mod_access
>Synopsis:       "Allow from" does not support mixing of notations
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    apache
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   apache
>Arrival-Date:   Mon Nov 06 08:50:06 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     jamie@playboy.com
>Release:        1.3.14
>Organization:
apache
>Environment:
FreeBSD 4.1.1-REL
>Description:
"Allow from" directive in httpd.conf does not support multiple variant
notations, NOR does it support multiple CIDR notations in the same statement.

Specifically, if I have a config such as:

--snip--
Allow from 10.0.0.0/8, 199.245.173.0/24
--snip--

Apache will DIE with reason:

Syntax error on line xx of /usr/local/apache/conf/httpd.conf:
syntax error in mask portion of network/netmask    

Obviously this is an incorect error message.  There is nothing wrong with the
CIDR notation: Apache just did not interpret/parse it correctly.

Similar invalid notations:

- Mixing CIDR and hostnames.

Specifically:

--snip--
Allow from 10.0.0.0/8, some.other.hostname
--snip--

.. this will refuse some.other.hostname with an error message in error_log
stating "[client ip.add.re.ss] client denied by server configuration: $CONFIG"

The only solution was to break each notation into individual allow from's:

--snip--
Allow from 10.0.0.0/8
Allow from 199.245.173.0/24
Allow from some.other.hostname, *.hostname.com   <- this works!
--snip--

Thanks.
>How-To-Repeat:
Two courses of action:

1) (Less optimal) Note in documentation somewhere that you can't do it
2) (Best) analyze and fix parsing of config..
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
 [In order for any reply to be added to the PR database, you need]
 [to include <ap...@Apache.Org> in the Cc line and make sure the]
 [subject line starts with the report component and number, with ]
 [or without any 'Re:' prefixes (such as "general/1098:" or      ]
 ["Re: general/1098:").  If the subject doesn't match this       ]
 [pattern, your message will be misfiled and ignored.  The       ]
 ["apbugs" address is not added to the Cc line of messages from  ]
 [the database automatically because of the potential for mail   ]
 [loops.  If you do not include this Cc, your reply may be ig-   ]
 [nored unless you are responding to an explicit request from a  ]
 [developer.  Reply only with text; DO NOT SEND ATTACHMENTS!     ]