You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2018/07/24 16:11:05 UTC

[Bug 62567] New: httpd-policy.conf.in contains HTML garbage and perhaps missing quotes for SetOutputFilter

https://bz.apache.org/bugzilla/show_bug.cgi?id=62567

            Bug ID: 62567
           Summary: httpd-policy.conf.in contains HTML garbage and perhaps
                    missing quotes for SetOutputFilter
           Product: Apache httpd-2
           Version: 2.5-HEAD
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core
          Assignee: bugs@httpd.apache.org
          Reporter: michal.babacek@gmail.com
  Target Milestone: ---

Hello,

After the resolution of [1] and [2] enabled the CMake Windows build of trunk
[3] for me, the smoke test that starts httpd and accesses HTTP on 80 and HTTPS
on 443 *and* checks for errors in the log kept failing on syntax errors in
httpd-policy.conf and:

> [Tue Jul 24 08:39:47.440977 2018] [core:error] [pid 1468:tid 3676] [client ::1:56088] 
> AH00082: an unknown filter was not added: 
> POLICY_TYPEPOLICY_LENGTHPOLICY_KEEPALIVEPOLICY_VARYPOLICY_VALIDATIONPOLICY_CONDITIONALPOLICY_NOCACHEPOLICY_MAXAGE

I tried with this patch [4], but as you can see, the CI keeps failing [5]:

>[Tue Jul 24 09:04:53.657743 2018] [core:error] [pid 1684:tid 3672] [client ::1:56123] 
> AH00082: an unknown filter was not added: 
> POLICY_TYPEPOLICY_LENGTHPOLICY_KEEPALIVEPOLICY_VARYPOLICY_VALIDATIONPOLICY_CONDITIONALPOLICY_NOCACHEPOLICY_MAXAGE
>[Tue Jul 24 09:04:53.660706 2018] [core:error] [pid 1684:tid 3672] [client ::1:56123] 
> AH00082: an unknown filter was not added: 
> POLICY_TYPEPOLICY_LENGTHPOLICY_KEEPALIVEPOLICY_VARYPOLICY_VALIDATIONPOLICY_CONDITIONALPOLICY_NOCACHEPOLICY_MAXAGE

What is the intended syntax for SetOutputFilter? Should the file or the parser
be fixed?

Cheers
K.

--

Accessing https://ci.modcluster.io requires an *arbitrary* GitHub account, it
keeps the silliest bots away, but I can attach anything to this BZ if anybody
would like me to.

[1] https://bz.apache.org/bugzilla/show_bug.cgi?id=62557#c11
[2] https://bz.apache.org/bugzilla/show_bug.cgi?id=62563#c3
[3] https://ci.modcluster.io/job/httpd-trunk-windows/
[4]
https://raw.githubusercontent.com/modcluster/ci.modcluster.io/master/windows/httpd/httpd-policy.conf.in.patch
[5]
https://ci.modcluster.io/job/httpd-trunk-windows/20/label=w2k12r2/consoleText

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 62567] httpd-policy.conf.in contains HTML garbage and perhaps missing quotes for SetOutputFilter

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62567

Michal Karm Babacek <mi...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |NEW

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 62567] httpd-policy.conf.in contains HTML garbage and perhaps missing quotes for SetOutputFilter

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62567

--- Comment #3 from Michal Karm Babacek <mi...@gmail.com> ---
https://github.com/apache/httpd/blob/trunk/server/core.c#L4827

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 62567] httpd-policy.conf.in contains HTML garbage and perhaps missing quotes for SetOutputFilter

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62567

--- Comment #4 from Michal Karm Babacek <mi...@gmail.com> ---
The problem is actually around here [1], the CMake list used as such probably
eats the semicolons in the files [2]. 

[1] https://github.com/apache/httpd/blob/trunk/CMakeLists.txt#L984
[2] https://cmake.org/pipermail/cmake/2016-January/062594.html

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 62567] httpd-policy.conf.in contains HTML garbage and perhaps missing quotes for SetOutputFilter

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62567

Michal Karm Babacek <mi...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |michal.babacek@gmail.com

--- Comment #1 from Michal Karm Babacek <mi...@gmail.com> ---
Created attachment 36050
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=36050&action=edit
Fixes the policy module conf for Linux, not Windows

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 62567] httpd-policy.conf.in contains HTML garbage and perhaps missing quotes for SetOutputFilter

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62567

Jim Jagielski <ji...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #7 from Jim Jagielski <ji...@apache.org> ---
Committed r1837717

Thx!

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 62567] httpd-policy.conf.in contains HTML garbage and perhaps missing quotes for SetOutputFilter

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62567

--- Comment #2 from Michal Karm Babacek <mi...@gmail.com> ---
Weird thing is that if I build on Fedora, with attachment 36050 patch in place
as:

> ./buildconf;CFLAGS="-O2" ./configure --enable-http2 --enable-policy  --enable-load-all-modules --prefix=/home/karm/Projects/MOD_CLUSTER/httpd-trunk-build;make;make install

And start httpd, send some requests to /, I can see HTTP 502 and the policy
module in action, complaining:

> AH03042: mod_policy: violation, rejecting request: 
>   Response has no explicit freshness lifetime (s-maxage, max-age or Expires/Date), uri: /index.html
> AH03042: mod_policy: violation, rejecting request: 
>   Etag and Last Modified missing, uri: /error/HTTP_BAD_GATEWAY.html.var
> AH03042: mod_policy: violation, rejecting request: 
>   Response has no explicit freshness lifetime (s-maxage, max-age or Expires/Date), uri: /error/HTTP_BAD_GATEWAY.html.var

Whereas Windows dies on parsing the httpd-policy.conf:

> AH00082: an unknown filter was not added: POLICY_TYPEPOLICY_LENGTHPOLICY_KEEPALIVEPOLICY_VARYPOLICY_VALIDATIONPOLICY_CONDITIONALPOLICY_NOCACHEPOLICY_MAXAGE

Could it be a ':' vs. ';' PATH delimiter thing on Linux vs Windows? Gonna look
into the module...

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 62567] httpd-policy.conf.in contains HTML garbage and perhaps missing quotes for SetOutputFilter

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62567

Michal Karm Babacek <mi...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO
           Keywords|                            |PatchAvailable

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 62567] httpd-policy.conf.in contains HTML garbage and perhaps missing quotes for SetOutputFilter

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62567

--- Comment #6 from Michal Karm Babacek <mi...@gmail.com> ---
Successfully built and smoke tested httpd trunk artifacts:
https://ci.modcluster.io/job/httpd-trunk-windows/label=w2k12r2/32/

Build log:
https://ci.modcluster.io/job/httpd-trunk-windows/label=w2k12r2/32/consoleText

(It requires one to have an arbitrary GitHub account (or a GitHub app token
with cURL), keeps the silliest bots away...)

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 62567] httpd-policy.conf.in contains HTML garbage and perhaps missing quotes for SetOutputFilter

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62567

Michal Karm Babacek <mi...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #36050|0                           |1
        is obsolete|                            |

--- Comment #5 from Michal Karm Babacek <mi...@gmail.com> ---
Created attachment 36057
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=36057&action=edit
Fixes policy module for Linux and Windows CMake build

Hi guys, ASF-BZ-62567.patch fixes the glitch. Could it be merged into trunk?

Linux works
===========

> $ patch -p1 -i ASF-BZ-62567.patch
> patching file CMakeLists.txt
> patching file docs/conf/extra/httpd-policy.conf.in
> patching file configure.in
> patching file docs/conf/httpd.conf.in

> CFLAGS="-O2" ./configure --enable-http2 --enable-policy  --enable-load-all-modules --prefix=/home/karm/Projects/MOD_CLUSTER/httpd-trunk-build;make;make install

> sed -i 's/LogLevel warn/LogLevel debug/g' ../conf/httpd.conf
> sed -i 's/#Include /Include /g' ../conf/httpd.conf

> [Mon Jul 30 14:58:23.147221 2018] [policy:error] [pid 23055:tid 140216748517120] 
>     [client 127.0.0.1:44016] AH03042: mod_policy: violation, rejecting request: 
>     Etag and Last Modified missing, uri: /error/HTTP_BAD_GATEWAY.html.var
> [Mon Jul 30 14:58:23.147253 2018] [policy:error] [pid 23055:tid 140216748517120] 
>     [client 127.0.0.1:44016] AH03042: mod_policy: violation, rejecting request: 
>     Response has no explicit freshness lifetime (s-maxage, max-age or Expires/Date), uri: /error/HTTP_BAD_GATEWAY.html.var

Windows works
=============

> [Mon Jul 30 07:58:30.409709 2018] [mpm_winnt:notice] [pid 5332:tid 500]
>      AH00354: Child: Starting 150 worker threads.
> [Mon Jul 30 07:58:31.337382 2018] [policy:error] [pid 5332:tid 3680]
>      [client ::1:56621] AH03042: mod_policy: violation, rejecting request: 
>      Response has no explicit freshness lifetime (s-maxage, max-age or Expires/Date), uri: /index.html
> [Mon Jul 30 07:58:31.339390 2018] [policy:error] [pid 5332:tid 3680]
>      [client ::1:56621] AH03042: mod_policy: violation, rejecting request: 
>      Etag and Last Modified missing, uri: /error/HTTP_BAD_GATEWAY.html.var
> [Mon Jul 30 07:58:31.339390 2018] [policy:error] [pid 5332:tid 3680]
>      [client ::1:56621] AH03042: mod_policy: violation, rejecting request: 
>      Response has no explicit freshness lifetime (s-maxage, max-age or Expires/Date), uri: /error/HTTP_BAD_GATEWAY.html.var

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org