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 2021/09/22 10:17:57 UTC

[Bug 65590] New: fix_uds_filename function seems broken since apache 2.4.49

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

            Bug ID: 65590
           Summary: fix_uds_filename function seems broken since apache
                    2.4.49
           Product: Apache httpd-2
           Version: 2.4.49
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_proxy
          Assignee: bugs@httpd.apache.org
          Reporter: scresto@gmail.com
  Target Milestone: ---

Since we have upgraded from httpd-2.4.48 to httpd-2.4.49 our websocket
application fail to load in web browser.
Apache seems to hang.


Our configuration is :

<Location /activex/>
  Options FollowSymLinks
  RewriteEngine On
  RewriteCond %{HTTP:Upgrade} !=websocket [NC]
  RewriteRule /activex/([^\/]+)/(.*)          
unix:/dev/shm/HXL_${NOM_UTILISATEUR}/backoffice_$1.socket|http://localhost/$2
[NE,P,L]

  RewriteCond %{HTTP:Upgrade} =websocket [NC]
  RewriteCond %{HTTP_COOKIE} hxlsession=([^;]+)
  RewriteRule /activex/([^\/]+)/(.*)          
unix:/dev/shm/HXL_${NOM_UTILISATEUR}/backoffice_$1.socket|ws://localhost/$2?arg=%1
[NE,P,L]
</Location>

To try to fix I have replace fix_uds_filename function in
httpd-2.4.49/modules/proxy/proxy_util.c with version presents in
httpd-2.4.48/modules/proxy/proxy_util.c and the problem has go away, 
so il looks like a httpd-2.4.49 regression.

If it can help I have add some trace in this function and it's look like the
probleme is with "unix:" part who does no more match with ap_cstr_casecmpn
function.
I notice too that r->filaneme length seem to anormaly grow.

Tracing r->filename display:
proxy:http://dev76.lis-dev.net:2000/activex/unix:/dev/shm/HXL_scresto/backoffice_session.8f304bcaaf818c4d5bd799b8c75dbf20.14400.MHXL.socket|http://localhost/
proxy:http://dev76.lis-dev.net:2000/activex/unix:/dev/shm/HXL_scresto/backoffice_session.8f304bcaaf818c4d5bd799b8c75dbf20.14400.MHXL.socket|http://localhost/
proxy:http://dev76.lis-dev.net:2000/activex/unix:/dev/shm/HXL_scresto/backoffice_unix:.socket|http://localhost/dev/shm/HXL_scresto/backoffice_session.8f304bcaaf818c4d5bd799b8c75dbf20.14400.MHXL.socket|http:/localhost/
proxy:http://dev76.lis-dev.net:2000/activex/unix:/dev/shm/HXL_scresto/backoffice_unix:.socket|http://localhost/dev/shm/HXL_scresto/backoffice_session.8f304bcaaf818c4d5bd799b8c75dbf20.14400.MHXL.socket|http:/localhost/
proxy:http://dev76.lis-dev.net:2000/activex/unix:/dev/shm/HXL_scresto/backoffice_unix:.socket|http://localhost/dev/shm/HXL_scresto/backoffice_unix:.socket|http:/localhost/dev/shm/HXL_scresto/backoffice_session.8f304bcaaf818c4d5bd799b8c75dbf20.14400.MHXL.socket|http:/localhost/
proxy:http://dev76.lis-dev.net:2000/activex/unix:/dev/shm/HXL_scresto/backoffice_unix:.socket|http://localhost/dev/shm/HXL_scresto/backoffice_unix:.socket|http:/localhost/dev/shm/HXL_scresto/backoffice_session.8f304bcaaf818c4d5bd799b8c75dbf20.14400.MHXL.socket|http:/localhost/
proxy:http://dev76.lis-dev.net:2000/activex/unix:/dev/shm/HXL_scresto/backoffice_unix:.socket|http://localhost/dev/shm/HXL_scresto/backoffice_unix:.socket|http:/localhost/dev/shm/HXL_scresto/backoffice_unix:.socket|http:/localhost/dev/shm/HXL_scresto/backoffice_session.8f304bcaaf818c4d5bd799b8c75dbf20.14400.MHXL.socket|http:/localhost/
proxy:http://dev76.lis-dev.net:2000/activex/unix:/dev/shm/HXL_scresto/backoffice_unix:.socket|http://localhost/dev/shm/HXL_scresto/backoffice_unix:.socket|http:/localhost/dev/shm/HXL_scresto/backoffice_unix:.socket|http:/localhost/dev/shm/HXL_scresto/backoffice_session.8f304bcaaf818c4d5bd799b8c75dbf20.14400.MHXL.socket|http:/localhost/]
proxy:http://dev76.lis-dev.net:2000/activex/unix:/dev/shm/HXL_scresto/backoffice_unix:.socket|http://localhost/dev/shm/HXL_scresto/backoffice_unix:.socket|http:/localhost/dev/shm/HXL_scresto/backoffice_unix:.socket|http:/localhost/dev/shm/HXL_scresto/backoffice_unix:.socket|http:/localhost/dev/shm/HXL_scresto/backoffice_session.8f304bcaaf818c4d5bd799b8c75dbf20.14400.MHXL.socket|http:/localhost/
proxy:http://dev76.lis-dev.net:2000/activex/unix:/dev/shm/HXL_scresto/backoffice_unix:.socket|http://localhost/dev/shm/HXL_scresto/backoffice_unix:.socket|http:/localhost/dev/shm/HXL_scresto/backoffice_unix:.socket|http:/localhost/dev/shm/HXL_scresto/backoffice_unix:.socket|http:/localhost/dev/shm/HXL_scresto/backoffice_session.8f304bcaaf818c4d5bd799b8c75dbf20.14400.MHXL.socket|http:/localhost/


If you need more information, please let me know.

Thanks

-- 
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 65590] fix_uds_filename function seems broken since apache 2.4.49

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

--- Comment #7 from Ruediger Pluem <rp...@apache.org> ---
Do you have traces for r->filename with the patch applied? Does the 38043
attached patch help?

-- 
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 65590] fix_uds_filename function seems broken since apache 2.4.49

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

--- Comment #8 from Yann Ylavic <yl...@gmail.com> ---
(In reply to Sylvain Cresto from comment #6)
> I have applied patch 38045 but it does not make different, it does not works.

Please verify that you are running the patched version, I can't reproduce the
issue with the patch applied.

Also the RewriteRule should go outside any Location or Directory section
(directly at the VirtualHost level), otherwise the rewritten URL will always be
prefixed by the directory or location specified, which breaks the "unix:"
scheme.

-- 
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 65590] fix_uds_filename function seems broken since apache 2.4.49

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

Yann Ylavic <yl...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |caleb@alerque.com

--- Comment #17 from Yann Ylavic <yl...@gmail.com> ---
*** Bug 65617 has been marked as a duplicate of this bug. ***

-- 
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 65590] fix_uds_filename function seems broken since apache 2.4.49

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

--- Comment #2 from Yann Ylavic <yl...@gmail.com> ---
Created attachment 38043
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=38043&action=edit
Handle UDS ("unix:") scheme is mod_rewrite

Maybe the issue is that mod_rewrite does not consider that a "unix:" scheme
forms an absolute URI?

-- 
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 65590] fix_uds_filename function seems broken since apache 2.4.49

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

--- Comment #6 from Sylvain Cresto <sc...@gmail.com> ---
Thanks for your quick reply.

OK I have move RewriteRules in correct Directy section.

I have applied patch 38045 but it does not make different, it does not works.
With fix_uds_filename function from httpd-2.4.48 it still works.

-- 
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 65590] fix_uds_filename function seems broken since apache 2.4.49

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

--- Comment #11 from Sylvain Cresto <sc...@gmail.com> ---
OK I've just test those patchs.
Patch 38043 is the mandatory patch.

Thanks

-- 
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 65590] fix_uds_filename function seems broken since apache 2.4.49

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

--- Comment #13 from Sylvain Cresto <sc...@gmail.com> ---
Yes, in my case :

Patch 38043 alone : good
Patch 38045 alone : bad
Patch 38043 + 38045 : good

-- 
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 65590] fix_uds_filename function seems broken since apache 2.4.49

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

Ruediger Pluem <rp...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |chris@modd.com.au

--- Comment #16 from Ruediger Pluem <rp...@apache.org> ---
*** Bug 65600 has been marked as a duplicate of this bug. ***

-- 
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 65590] fix_uds_filename function seems broken since apache 2.4.49

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

Ruediger Pluem <rp...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All
         Resolution|---                         |INVALID
             Status|NEW                         |RESOLVED

--- Comment #1 from Ruediger Pluem <rp...@apache.org> ---
Your RewriteRules are broken. Move them out of the Location block and it should
work. The r->filenames you show below are correctly classified as invalid.

-- 
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 65590] fix_uds_filename function seems broken since apache 2.4.49

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

--- Comment #15 from Sylvain Cresto <sc...@gmail.com> ---
Thanks !

-- 
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 65590] fix_uds_filename function seems broken since apache 2.4.49

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

--- Comment #3 from Yann Ylavic <yl...@gmail.com> ---
Related to bug 57691 ?

-- 
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 65590] fix_uds_filename function seems broken since apache 2.4.49

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

Yann Ylavic <yl...@gmail.com> changed:

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

--- Comment #5 from Yann Ylavic <yl...@gmail.com> ---
Created attachment 38045
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=38045&action=edit
Handle UDS ("unix:") scheme in mod_rewrite [P]

This one should compile..

-- 
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 65590] fix_uds_filename function seems broken since apache 2.4.49

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

Yann Ylavic <yl...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |DUPLICATE
           Keywords|                            |FixedInTrunk
             Status|REOPENED                    |RESOLVED

--- Comment #14 from Yann Ylavic <yl...@gmail.com> ---
Thanks for testing Sylvain.

This is now fixed in trunk (r1893516) with the patch attachment 37289 from bug
57691, so I'm marking this PR as duplicate to track the backport at a single
place.

*** This bug has been marked as a duplicate of bug 57691 ***

-- 
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 65590] fix_uds_filename function seems broken since apache 2.4.49

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

Sylvain Cresto <sc...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|INVALID                     |---
             Status|RESOLVED                    |REOPENED

-- 
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 65590] fix_uds_filename function seems broken since apache 2.4.49

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

--- Comment #10 from Ruediger Pluem <rp...@apache.org> ---
Only one of the patches should be applied. Can you please do tests with only
one of them applied?

-- 
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 65590] fix_uds_filename function seems broken since apache 2.4.49

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

--- Comment #12 from Yann Ylavic <yl...@gmail.com> ---
Do you mean that 38045 alone is not working?

-- 
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 65590] fix_uds_filename function seems broken since apache 2.4.49

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

--- Comment #4 from Yann Ylavic <yl...@gmail.com> ---
Created attachment 38044
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=38044&action=edit
Handle UDS ("unix:") scheme in mod_rewrite [P]

Or maybe this one instead since the "unix:" scheme is a [P] thing only.

-- 
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 65590] fix_uds_filename function seems broken since apache 2.4.49

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

--- Comment #9 from Sylvain Cresto <sc...@gmail.com> ---
Hi

OK my bad, i haven't applied patch 38043.

With patchs 38043 and 38045 it's now correctly working, thank you !

-- 
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