Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
*httpd* no longer fails to start if there is a comment in the `Allow` directive
Comments had been disallowed at the end of the `Allow` directive in the Apache *mod_authz_host* module. Consequently, the *httpd* daemon failed to start with a syntax error if such a comment was included. With this update, it is possible to insert comments starting with the `#` (hash) sign, where `#` is interpreted as an end of line, in `Allow` or `Deny` directives.
Description of problem:
After an upgrade to httpd-2.2.15-53 apachectl reports the following syntax
error:
# apachectl configtest
Syntax error on line 35 of XXX/blahblahsome.conf:
No comments are allowed here
The block in question looks like this:
<Location /server-info>
SetHandler server-info
Order deny,allow
Deny from all
Allow from 1.2.3.4 # test me
</Location>
Removing the end of line comment "# test me" remediates the issue.
Version-Release number of selected component (if applicable):
httpd-2.2.15-53
The configuration is valid with httpd-2.2.15-47, I did not check the releases
in between (yet).
How reproducible:
Create a config block like the one quoted above.
Actual results:
restart of httpd fails with a syntax error
Expected results:
it should parse the config that was valid before and start :)
Or a note in the tech release notes, well I could not spot one, maybe I missed it.
Yes, that may have missed the release notes, sorry! This change is expected.
1) To be super-pedantic, it's not a valid configuration in the old version, because '#' is treated as a hostname and '#' is not a valid DNS character.
2) It would allow any host with reverse-DNS of "test" or "me", which is not (presumably) expected.
I expected something like that. :) As far as I can follow back the history of this configuration file someone put it into this configuration a very long time ago.
Not sure if it maybe was valid in Apache 1.3/2.0 times. Anyway I'll fix our configurations but it might be worth a note for other people with similar odd and old configurations.
This seems to be a rather simplified fix for a serious issue.
It will stop HTTPD from starting, after reboot (since the syntax will not validate).
Since "#" is not a valid DNS name, it would make more sense to interpret "#" as EOL in the Allow/Deny lines.
To be fair, "# as EOL" is the approach used in 2.4.x mod_authz_host; I'll propose the same upstream for Allow/Deny, and we should be able to backport that without any risk.
Bug reproduced on two previous versions : httpd-2.2.15-57.el6.x86_64.rpm, httpd-2.2.15-55.el6_8.2.x86_64
Test case for this bug was run and completed successfully on all archs. Link to beaker job - https://beaker.engineering.redhat.com/jobs/1612311
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://rhn.redhat.com/errata/RHBA-2017-0784.html
Description of problem: After an upgrade to httpd-2.2.15-53 apachectl reports the following syntax error: # apachectl configtest Syntax error on line 35 of XXX/blahblahsome.conf: No comments are allowed here The block in question looks like this: <Location /server-info> SetHandler server-info Order deny,allow Deny from all Allow from 1.2.3.4 # test me </Location> Removing the end of line comment "# test me" remediates the issue. Version-Release number of selected component (if applicable): httpd-2.2.15-53 The configuration is valid with httpd-2.2.15-47, I did not check the releases in between (yet). How reproducible: Create a config block like the one quoted above. Actual results: restart of httpd fails with a syntax error Expected results: it should parse the config that was valid before and start :) Or a note in the tech release notes, well I could not spot one, maybe I missed it.