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 2016/04/01 09:18:21 UTC

[Bug 59260] New: mod_rewrite removes %0A ?

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

            Bug ID: 59260
           Summary: mod_rewrite removes %0A ?
           Product: Apache httpd-2
           Version: 2.4-HEAD
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: major
          Priority: P2
         Component: mod_rewrite
          Assignee: bugs@httpd.apache.org
          Reporter: ben.rubson@gmail.com

Hello,

I have some URLs (from an API) containing %0A.
These URLs go through mod_rewrite, and sounds like that the "%0A.*" part is
removed from the URLs, which of course makes the API to fail.

Is my assumption true ?
Are there other characters / strings removed from the URL ?
Could we think about a "raw" mode which would keep all characters ?

Thank you very much,

Best regards,

Ben

-- 
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 59260] mod_rewrite removes %0A ?

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

Ben RUBSON <be...@gmail.com> changed:

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

--- Comment #4 from Ben RUBSON <be...@gmail.com> ---
Hello Eric,

yes you're right, playing with the following (crappy) rule shows what you says
and makes my quick test to work :
RewriteRule (.*\n*.*) https://127.0.0.1:1234$1 [P]

And playing with %{THE_REQUEST} shows it too.

Thank you very much Eric !

I then mark this (non) "bug" as resolved.

Ben

-- 
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 59260] mod_rewrite removes %0A ?

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

--- Comment #2 from Ben RUBSON <be...@gmail.com> ---
Rich,

Of course, for an easy test let's use the following rule :
RewriteRule (.*) https://127.0.0.1:1234$1 [P]

Local server access log :
"GET /test/test%0Aunix?{} HTTP/1.1"
"GET /test/test%0D%0Awin?{} HTTP/1.1"
"GET /test/test%0Dmac?{} HTTP/1.1"

Corresponding remote server access log :
"GET /test/test?{} HTTP/1.1"
"GET /test/test%0D?{} HTTP/1.1"
"GET /test/test%0Dmac?{} HTTP/1.1"

As you can see goal is to test %OA (\n) and %OAD (\r) characters behavior.

Thank you very much,

Ben

-- 
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 59260] mod_rewrite removes %0A ?

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

--- Comment #1 from Rich Bowen <rb...@apache.org> ---
Can you give us a litte more to go on? Like maybe the rewrite rule set?

-- 
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 59260] mod_rewrite removes %0A ?

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

--- Comment #3 from Eric Covener <co...@gmail.com> ---
They haven't been removed.  What you observe is that the server decodes them,
then you capture them and use those in a substution. If you want to see what
was sent before it was decoded, you have to look at %{THE_REQUEST} instead.

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