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

            Bug ID: 58828
           Summary: LA-U variables not set depending on the URI
           Product: Apache httpd-2
           Version: 2.4-HEAD
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: major
          Priority: P2
         Component: mod_rewrite
          Assignee: [email protected]
          Reporter: [email protected]

Hello,

I think I found a bug where %{LA-U:VARS} variables are not correctly set,
depending on the URI.



Here is the configuration I use, which gives an authenticated user ($1) its own
files ($2) :

DocumentRoot /users/www/default
<Directory /users/www>
Options Indexes
AuthType Basic
(...)
Require valid-user
</Directory>
RewriteCond $1:%{LA-U:REMOTE_USER} ^(.+):\1$
RewriteRule ^/([^/]+)/(.*)$ /users/www/$1/$2



Here is my test directory structure :
/users/www/testuser/foo%1
/users/www/testuser/foo%10



foo%1 results :
"GET /testuser/foo%251/ HTTP/1.1" 404
File does not exist: /users/www/default/testuser/foo%251/

foo%10 results :
"GET /authuser/foo%2510/ HTTP/1.1" 200



I then tested some other directory patterns :
- work : "foo%1bar"
- don't work : "foo%2", "foo%3", ..., "foo%9", "foo%1 bar"



I then found that for failing patterns, %{LA-U:REMOTE_USER} is empty :

If I use the following less restrictive condition, patterns still fail :
RewriteCond $1:%{LA-U:REMOTE_USER} ^(.+):(.+)$

But if I use the following one (allowing empty var), then all patterns are OK :
RewriteCond $1:%{LA-U:REMOTE_USER} ^(.+):(.*)$



I then tested the following condition :
RewriteCond $1:%{LA-U:REQUEST_FILENAME} ^(.+):(.+)$
Failing patterns still fail !

And with the following one :
RewriteCond $1:%{REQUEST_FILENAME} ^(.+):(.+)$
All patterns are correctly rewritten !



Is there an issue with mod_rewrite and LA-U on some URI patterns ?
Could you help me finding the issue / patching the code please ?

Thank you very much !

Ben

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to