Re: *Match, RewriteRule POLA violation?

2015-05-04 Thread Yann Ylavic
On Fri, May 1, 2015 at 9:01 PM, Jim Riggs apache-li...@riggs.me wrote: I may go ahead and write up a patch this weekend to change them all (*Match and RewriteRule) and then we can all debate it over on bugz too! ap_getparents() may be the right place to strip (non-leading-)double-slashes

Re: *Match, RewriteRule POLA violation?

2015-05-04 Thread André Malo
but not the request URL //abc. Based on all of my tests, the leading slash *is* collapsed in the *Match and RewriteRule directives. Subsequent slashes after the first are not. It's probably too old. So, it is documented, but is there a compelling use case for this? When would someone actually

Re: *Match, RewriteRule POLA violation?

2015-05-04 Thread William A Rowe Jr
On Mon, May 4, 2015 at 6:01 AM, Yann Ylavic ylavic@gmail.com wrote: On Fri, May 1, 2015 at 9:01 PM, Jim Riggs apache-li...@riggs.me wrote: I may go ahead and write up a patch this weekend to change them all (*Match and RewriteRule) and then we can all debate it over on bugz too

Re: *Match, RewriteRule POLA violation?

2015-05-04 Thread Yann Ylavic
(*Match and RewriteRule) and then we can all debate it over on bugz too! ap_getparents() may be the right place to strip (non-leading-)double-slashes, for any code using r-uri to be fixed. None of this thread mentions /client/provided/./url, another issue. Precisely ap_getparents() strips all

Re: *Match, RewriteRule POLA violation?

2015-05-02 Thread Jim Riggs
*is* collapsed in the *Match and RewriteRule directives. Subsequent slashes after the first are not. So, it is documented, but is there a compelling use case for this? When would someone actually need to match against the multiple slashes (unless it's some really strange hack someone has implemented

Re: *Match, RewriteRule POLA violation?

2015-05-01 Thread Niklas Edmundsson
On Thu, 30 Apr 2015, Yann Ylavic wrote: On Thu, Apr 30, 2015 at 2:57 PM, Jim Riggs apache-li...@riggs.me wrote: Thanks, Yann. I remember looking at this code before. The question remains, though: Is it currently wrong? Does it need to be fixed, or was this distinction made intentionally? Is

Re: *Match, RewriteRule POLA violation?

2015-05-01 Thread André Malo
* Niklas Edmundsson wrote: On Thu, 30 Apr 2015, Yann Ylavic wrote: On Thu, Apr 30, 2015 at 2:57 PM, Jim Riggs apache-li...@riggs.me wrote: Thanks, Yann. I remember looking at this code before. The question remains, though: Is it currently wrong? Does it need to be fixed, or was this

Re: *Match, RewriteRule POLA violation?

2015-04-30 Thread Yann Ylavic
On Thu, Apr 30, 2015 at 2:57 PM, Jim Riggs apache-li...@riggs.me wrote: Thanks, Yann. I remember looking at this code before. The question remains, though: Is it currently wrong? Does it need to be fixed, or was this distinction made intentionally? Is there a specific use case that requires

Re: *Match, RewriteRule POLA violation?

2015-04-30 Thread Jim Riggs
, | | | Directive: | RewriteRule: | RewriteRule: | | | /slash/foo | ^/slash/foo | ^/slash/+foo | +---+--+--+--+ | /slash/foo| Match| Match| Match

Re: *Match, RewriteRule POLA violation?

2015-04-30 Thread Daniel Ruggeri
+1 By unbreaking configurations we are indeed changing behavior. This could be an unexpected change for an admin during a minor upgrade but I weigh that against the fact that directives enclosed by these matches may be intended to add security/authorization/authentication which a badly written

Re: *Match, RewriteRule POLA violation?

2015-04-28 Thread Yann Ylavic
passed to regex-matching directives, or is there a specific reason that is not done? +---+--+--+--+ | Path | Non-Regex |*Match, |*Match, | | | Directive: | RewriteRule: | RewriteRule

Re: *Match, RewriteRule POLA violation?

2015-04-28 Thread André Malo
* Jim Riggs wrote: This came up at ApacheCon a couple of weeks ago. I just took this knowledge for granted, as I have always accounted for it, but both Rich and Trawick were surprised. As I thought about it some more, it seems this may be a POLA violation. Thoughts? If we agree it should be

*Match, RewriteRule POLA violation?

2015-04-27 Thread Jim Riggs
, or is there a specific reason that is not done? +---+--+--+--+ | Path | Non-Regex |*Match, |*Match, | | | Directive: | RewriteRule: | RewriteRule: | | | /slash/foo | ^/slash/foo | ^/slash

rewriterule

2014-03-14 Thread Ligade, Shailesh [USA]
Hello, I want to log client certificate chain, when there is ssl verification failure. So I have a rule RewriteCond %{SSL:SSL_CLIENT_VERIFY} !=SUCCESS RewriteRule ^(.*)$ /cgi-bin/printenv.pl [QSA,PT,L] But it doesn’t work. If change the rule to success, it works, but I need to log the chain

Why does RewriteRule [P] fully qualifies the URI?

2014-02-26 Thread Yann Ylavic
Helo, when handling a RewriteRule with the [P] flag, mod_rewrite always call fully_qualify_uri() on the rewritten URL before returning. This does nothing if the URL is already absolute, otherwise this will result in : ap_http_scheme(r)://ap_get_server_name_for_url(r):ap_get_server_port(r)/non

Re: Why does RewriteRule [P] fully qualifies the URI?

2014-02-26 Thread Eric Covener
On Wed, Feb 26, 2014 at 11:37 AM, Yann Ylavic ylavic@gmail.com wrote: Helo, when handling a RewriteRule with the [P] flag, mod_rewrite always call fully_qualify_uri() on the rewritten URL before returning. This does nothing if the URL is already absolute, otherwise this will result

Re: Why does RewriteRule [P] fully qualifies the URI?

2014-02-26 Thread Yann Ylavic
On Wed, Feb 26, 2014 at 5:54 PM, Eric Covener cove...@gmail.com wrote: On Wed, Feb 26, 2014 at 11:37 AM, Yann Ylavic ylavic@gmail.com wrote: Helo, when handling a RewriteRule with the [P] flag, mod_rewrite always call fully_qualify_uri() on the rewritten URL before returning

Re: Why does RewriteRule [P] fully qualifies the URI?

2014-02-26 Thread Eric Covener
On Wed, Feb 26, 2014 at 12:06 PM, Yann Ylavic ylavic@gmail.com wrote: On Wed, Feb 26, 2014 at 5:54 PM, Eric Covener cove...@gmail.com wrote: On Wed, Feb 26, 2014 at 11:37 AM, Yann Ylavic ylavic@gmail.com wrote: Helo, when handling a RewriteRule with the [P] flag, mod_rewrite

Re: Fix for CVE-2011-4317 broke RewriteRule in forward proxy?

2012-04-11 Thread Jeff Trawick
be RewriteRule not RewriteMap in my previous mail. I simplified the config to a single RewriteRule but forgot to adjst subject and intro of my mail. The problem remains the same. Doesn't that ring a bell - namely the one of PR 52774? Thanks Kaspar, yes that's the same issue. Sorry

Re: Fix for CVE-2011-4317 broke RewriteRule in forward proxy?

2012-03-24 Thread Kaspar Brand
On 23.03.2012 18:11, Rainer Jung wrote: It should be RewriteRule not RewriteMap in my previous mail. I simplified the config to a single RewriteRule but forgot to adjst subject and intro of my mail. The problem remains the same. Doesn't that ring a bell - namely the one of PR 52774? Kaspar

Re: Fix for CVE-2011-4317 broke RewriteRule in forward proxy?

2012-03-24 Thread Rainer Jung
On 24.03.2012 07:02, Kaspar Brand wrote: On 23.03.2012 18:11, Rainer Jung wrote: It should be RewriteRule not RewriteMap in my previous mail. I simplified the config to a single RewriteRule but forgot to adjst subject and intro of my mail. The problem remains the same. Doesn't that ring

Re: Fix for CVE-2011-4317 broke RewriteRule in forward proxy?

2012-03-24 Thread Jeff Trawick
On Sat, Mar 24, 2012 at 7:31 AM, Rainer Jung rainer.j...@kippdata.de wrote: On 24.03.2012 07:02, Kaspar Brand wrote: On 23.03.2012 18:11, Rainer Jung wrote: It should be RewriteRule not RewriteMap in my previous mail. I simplified the config to a single RewriteRule but forgot to adjst

Re: Fix for CVE-2011-4317 broke RewriteRule in forward proxy?

2012-03-24 Thread Rainer Jung
On 24.03.2012 16:39, Jeff Trawick wrote: On Sat, Mar 24, 2012 at 7:31 AM, Rainer Jungrainer.j...@kippdata.de wrote: On 24.03.2012 07:02, Kaspar Brand wrote: On 23.03.2012 18:11, Rainer Jung wrote: It should be RewriteRule not RewriteMap in my previous mail. I simplified the config

Re: Fix for CVE-2011-4317 broke RewriteRule in forward proxy?

2012-03-23 Thread Rainer Jung
It should be RewriteRule not RewriteMap in my previous mail. I simplified the config to a single RewriteRule but forgot to adjst subject and intro of my mail. The problem remains the same. On 23.03.2012 18:00, Rainer Jung wrote: It seems using a rewrite map in a forward proxy is broken

Re: 2.3.15 RewriteRule P

2012-01-05 Thread Jim Jagielski
On Jan 4, 2012, at 9:25 PM, Eric Covener wrote: Is keeping the generic worker reusable important? If possible, then yeah. But if adds a lot of complexity to the code, or reduces the efficiency of the named workers, then I'd punt it for now...

Re: 2.3.15 RewriteRule P

2012-01-05 Thread Eric Covener
On Wed, Jan 4, 2012 at 3:42 PM, Rüdiger Plüm r.pl...@gmx.de wrote: Eric Covener wrote: The different handling of conn-port and conn-hostname doesn't look right to me. Can the r-proxyreq check actually be false at this point or is it simply redundant? And shouldn't the

Re: 2.3.15 RewriteRule P

2012-01-04 Thread Rüdiger Plüm
Eric Covener wrote: The different handling of conn-port and conn-hostname doesn't look right to me. Can the r-proxyreq check actually be false at this point or is it simply redundant? And shouldn't the strcasecmp(conn-hostname, uri-hostname) check be done regardless of

Re: 2.3.15 RewriteRule P

2012-01-04 Thread Eric Covener
On Wed, Jan 4, 2012 at 3:42 PM, Rüdiger Plüm r.pl...@gmx.de wrote: Eric Covener wrote: The different handling of conn-port and conn-hostname doesn't look right to me. Can the r-proxyreq check actually be false at this point or is it simply redundant? And shouldn't the

Re: 2.3.15 RewriteRule P

2012-01-02 Thread Stefan Fritsch
-cp-addr; +} } /* Close a possible existing socket if we are told to do so */ if (conn-close) { virtualhost *:80 RewriteEngine on RewriteRule ^/a http://localhost:81/a [P] RewriteRule ^/b http://localhost:82/b [P] /virtualhost virtualhost *:81 AliasMatch ^/a$ /home

Re: 2.3.15 RewriteRule P

2012-01-02 Thread Eric Covener
The different handling of conn-port and conn-hostname doesn't look right to me. Can the r-proxyreq check actually be false at this point or is it simply redundant? And shouldn't the strcasecmp(conn-hostname, uri-hostname) check be done regardless of r-connection-keepalives? I did not

Re: 2.3.15 RewriteRule P

2012-01-01 Thread Stefan Fritsch
On Wednesday 16 November 2011, Steffen wrote: What I noticed, it is connecting to a port by a formerly used proxied connection (port 7080 instead of 81); Summary log: [proxy:debug] [pid 8680:tid 2668] proxy_util.c(2140): proxy: HTTP: has acquired connection for (*) [proxy:debug] [pid

Re: 2.3.15 RewriteRule P

2012-01-01 Thread Eric Covener
-proxy_toggle_ports.diff virtualhost *:80 RewriteEngine on RewriteRule ^/a http://localhost:81/a [P] RewriteRule ^/b http://localhost:82/b [P] /virtualhost virtualhost *:81 AliasMatch ^/a$ /home/covener/SRC/httpd-trunk/built/icons/a.gif /virtualhost virtualhost *:82 AliasMatch ^/b$ /home

Re: 2.3.15 RewriteRule P

2012-01-01 Thread Ruediger Pluem
Stefan Fritsch wrote: On Wednesday 16 November 2011, Steffen wrote: What I noticed, it is connecting to a port by a formerly used proxied connection (port 7080 instead of 81); Summary log: [proxy:debug] [pid 8680:tid 2668] proxy_util.c(2140): proxy: HTTP: has acquired connection for

Re: 2.3.15 RewriteRule P

2011-11-16 Thread Steffen
: Re: 2.3.15 RewriteRule P Hi Steffen, On Mon, 14 Nov 2011, Steffen wrote: The issue below seems not to be related to SSL. Tested in different non-SSL configs with eg. RewriteRule /sysadmin(.*) http://%{HTTP_HOST}:81/sysadmin$1 [P,L] And different servers as the back, Sambar, Surge, DManager

Re: 2.3.15 RewriteRule P

2011-11-15 Thread Stefan Fritsch
Hi Steffen, On Mon, 14 Nov 2011, Steffen wrote: The issue below seems not to be related to SSL. Tested in different non-SSL configs with eg. RewriteRule /sysadmin(.*) http://%{HTTP_HOST}:81/sysadmin$1 [P,L] And different servers as the back, Sambar, Surge, DManager and Apache. Sometimes

Re: 2.3.15 RewriteRule P

2011-11-15 Thread Jim Jagielski
Am I correct in assuming this is just under Windows...?? On Nov 14, 2011, at 1:31 PM, Steffen wrote: The issue below seems not to be related to SSL. Tested in different non-SSL configs with eg. RewriteRule /sysadmin(.*) http://%{HTTP_HOST}:81/sysadmin$1 [P,L] And different servers

Re: 2.3.15 RewriteRule P

2011-11-15 Thread Stefan Fritsch
On Monday 14 November 2011, William A. Rowe Jr. wrote: On 11/14/2011 12:31 PM, Steffen wrote: The issue below seems not to be related to SSL. Tested in different non-SSL configs with eg. RewriteRule /sysadmin(.*) http://%{HTTP_HOST}:81/sysadmin$1 [P,L] And different servers

2.3.15 RewriteRule P

2011-11-14 Thread Steffen
The issue below seems not to be related to SSL. Tested in different non-SSL configs with eg. RewriteRule /sysadmin(.*) http://%{HTTP_HOST}:81/sysadmin$1 [P,L] And different servers as the back, Sambar, Surge, DManager and Apache. Sometimes it works but mostly it is not passing (good) URL info

2.3.15 RewriteRule P

2011-11-14 Thread Steffen
The issue below seems not to be related to SSL. Tested in different non-SSL configs with eg. RewriteRule /sysadmin(.*) http://%{HTTP_HOST}:81/sysadmin$1 [P,L] And different servers as the back, Sambar, Surge, DManager and Apache. Sometimes it works but mostly it is not passing (good) URL info

Re: 2.3.15 RewriteRule P

2011-11-14 Thread William A. Rowe Jr.
On 11/14/2011 12:31 PM, Steffen wrote: The issue below seems not to be related to SSL. Tested in different non-SSL configs with eg. RewriteRule /sysadmin(.*) http://%{HTTP_HOST}:81/sysadmin$1 [P,L] And different servers as the back, Sambar, Surge, DManager and Apache. Sometimes it works

RewriteRule question

2011-08-25 Thread Denys
/test.dll). In my case adding / is not working because now test.dll part is meant as a directory instead of a file test.dll inside test directory (my IIS server thinks so). After that I tried to use RewriteRule. For example: RewriteRule /test1/test2/ http://another_server/test/test.dll. This time

Re: RewriteRule question

2011-08-25 Thread Denys
in context: http://old.nabble.com/RewriteRule-question-tp32332668p32332668.html Oh, right, a website that appropriates our list and misleads (some) users. Sent from the Apache HTTP Server - Module Writers mailing list archive at Nabble.com. But that looks clear enough to me. Is the website so two

Re: RewriteRule question

2011-08-25 Thread Nick Kew
On 25 Aug 2011, at 11:04, Denys wrote: Do you mean, Nick, that I have submitted the question to the wrong branch? branch? What's a branch? This is a mailing list for module developers! Sorry, my reply was OTT. I just get a bit cross at some of the stuff that gets misdirected from

Re: RewriteRule question

2011-08-25 Thread Nick Kew
On 25 Aug 2011, at 11:04, Denys wrote: Do you mean, Nick, that I have submitted the question to the wrong branch? branch? What's a branch? This is a mailing list for module developers! Sorry, my reply was OTT. I just get a bit cross at some of the stuff that gets misdirected from

Re: RewriteRule ... /$1 considered harmful

2011-07-06 Thread Stefan Fritsch
On Monday 02 May 2011, Eric Covener wrote: On Sun, May 1, 2011 at 10:40 PM, Eric Covener cove...@gmail.com wrote: - Create new directives RewriteToPath, RewriteToURL that don't do guessing. - Document clearly the problems that may be caused by the guessing behaviour of RewriteRule. Maybe

Re: RewriteRule ... /$1 considered harmful

2011-05-02 Thread Rich Bowen
On May 2, 2011, at 12:04 AM, Eric Covener wrote: I took a pass at the doc to make the stuff we're discussing a bit more explicit which might help the discussion/deprecation too. http://people.apache.org/~covener/patches/rewrite-substitution_clarity.diff +1 to changes. -- Rich Bowen

Re: RewriteRule ... /$1 considered harmful

2011-05-01 Thread Eric Covener
- Create new directives RewriteToPath, RewriteToURL that don't do guessing. - Document clearly the problems that may be caused by the guessing behaviour of RewriteRule. Maybe even mark RewriteRule as deprecated in 2.4. another one on users@, +1 to this approach and strong advice

Re: RewriteRule ... /$1 considered harmful

2011-05-01 Thread Eric Covener
On Sun, May 1, 2011 at 10:40 PM, Eric Covener cove...@gmail.com wrote: - Create new directives RewriteToPath, RewriteToURL that don't do guessing. - Document clearly the problems that may be caused by the guessing behaviour of RewriteRule. Maybe even mark RewriteRule as deprecated in 2.4

Re: RewriteRule ... /$1 considered harmful

2011-05-01 Thread André Malo
by the guessing behaviour of RewriteRule. Maybe even mark RewriteRule as deprecated in 2.4. Why not flags to RewriteRule? like RewriteRule ... /$1 [abs] (or [rel]). For compat reasons I'd keep the current behaviour without such a flag. nd -- Das Verhalten von Gates hatte mir bewiesen, dass ich auf

RewriteRule ... /$1 considered harmful

2011-04-15 Thread Stefan Fritsch
Hi, a client used RewriteRule ^/some/old/path/(.*)$ /$1 in his httpd config, in order to redirect some paths that are now available directly under the document root. This has the problem that mod_rewrite guesses if the substituted path is an URL or an absoulte local path by looking at the first

RE: RewriteRule ... /$1 considered harmful

2011-04-15 Thread Plüm, Rüdiger, VF-Group
-Original Message- From: Stefan Fritsch Sent: Freitag, 15. April 2011 11:08 To: dev@httpd.apache.org Subject: RewriteRule ... /$1 considered harmful Hi, a client used RewriteRule ^/some/old/path/(.*)$ /$1 in his httpd config, in order to redirect some paths

RE: RewriteRule ... /$1 considered harmful

2011-04-15 Thread Stefan Fritsch
On Fri, April 15, 2011 11:34, Plüm, Rüdiger, VF-Group wrote: RewriteRule ^/some/old/path/(.*)$ /$1 in his httpd config, in order to redirect some paths that are now available directly under the document root. This has the problem that mod_rewrite guesses if the substituted path is an URL

Apache RewriteRule blocks sending out headers

2010-01-04 Thread jacksam123
Hi, i am using apache http server to rewrite and i have defined few rules. I have a problem during this rewriterules, the actual headers are lost. Is it possible to send the headers along with the request. -- View this message in context: http://old.nabble.com/Apache-RewriteRule-blocks-sending

RewriteRule unexpected behaviours

2007-12-17 Thread Vincent Bray
Hi, RewriteRule does tilde expansion even without mod_userdir being loaded, and it does so without the usual public_html component being added. This is a) not mod_rewrite's business and b) a practically unknown feature. I'd like to see this feature removed. There's also an issue

RewriteRule with a dot in URL

2007-07-13 Thread Thierry Kennes
on .htaccess about RewriteRule and I thought of adding somethg like that : RewriteRule (.*)\.(.*)$ substitution Is my pattern right ? and also what can I put instead of substitution ? Thanks a lot for your further reply. ps: and sorry for my bad english :) -- View this message in context: http

Re: RewriteRule with a dot in URL

2007-07-13 Thread Thierry Kennes
Great thanks anyway Joe Lewis-2 wrote: Uh, the main website would show some definitive examples that you could use. Since apparently google didn't accept your apache rewriterule query, I have a result : http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html (and yes, the periods

[PATCH] mod_rewrite QSR RewriteRule flag

2007-01-06 Thread Vinko Vrsalovic
Hello, I'm a newbie apache coder, so I apologize in advance for any mistake or oversight :-) I've coded this small patch to avoid the ugly hack of having to write rules such as RewriteRule .* /index.cgi? to tell mod_rewrite forget the QS and thus provide greater consistency in the flags API

Proxy parameters to RewriteRule [P]

2006-05-05 Thread Bjørn Stabell
We're just trying out mod_proxy_balancer now and have come across some shortcomings or bugs. It doesn't seem like we can pass any of the Proxy parameters to RewriteRule, e.g., RewriteRule ^/mbp/(.*) balancer://ourcluster/$1 [P] timeout=20 nofailover=On stickysession=OUR_COOKIE doesn't

Re: Proxy parameters to RewriteRule [P]

2006-05-05 Thread Robert Ionescu
Bjørn Stabell wrote: RewriteRule ^/mbp/(.*) balancer://ourcluster/$1 [P] timeout=20 nofailover=On stickysession=OUR_COOKIE those (proxy) arguments are not part of the RewriteRule directive/mod_rewrite. Try to use RewriteRule ^/mbp/(.*) balancer://ourcluster/$1 [P] Proxy balancer

Re: mod_proxy broke RewriteRule ... [P]

2004-10-14 Thread Geoffrey Young
for RewriteRule [P] flag which is broken in HEAD due to mod_proxy changes. Revision ChangesPath 1.11 +9 -1 httpd-test/perl-framework/t/modules/rewrite.t Index: rewrite.t === RCS file: /home/cvs/httpd

mod_proxy broke RewriteRule ... [P]

2004-10-12 Thread Joe Orton
-framework/t/conf extra.conf.in jorton 2004/10/12 06:53:41 Modified:perl-framework/t/modules rewrite.t perl-framework/t/conf extra.conf.in Log: Add test for RewriteRule [P] flag which is broken in HEAD due to mod_proxy changes. Revision ChangesPath 1.11 +9